mirror of
https://github.com/penpot/penpot.git
synced 2025-01-06 14:50:20 -05:00
✨ Frontend integration tests
This commit is contained in:
parent
99371234dc
commit
6b76213128
4 changed files with 17 additions and 6 deletions
|
@ -102,6 +102,16 @@ jobs:
|
|||
yarn install
|
||||
yarn test
|
||||
|
||||
- run:
|
||||
name: "frontend integration tests"
|
||||
working_directory: "./frontend"
|
||||
command: |
|
||||
yarn install
|
||||
yarn run compile
|
||||
clojure -M:dev:shadow-cljs compile main
|
||||
yarn playwright install --with-deps chromium
|
||||
yarn e2e:test
|
||||
|
||||
- run:
|
||||
name: "backend tests"
|
||||
working_directory: "./backend"
|
||||
|
|
|
@ -18,18 +18,18 @@ export default defineConfig({
|
|||
/* Retry on CI only */
|
||||
retries: process.env.CI ? 2 : 0,
|
||||
/* Opt out of parallel tests on CI. */
|
||||
workers: process.env.CI ? 1 : undefined,
|
||||
workers: process.env.CI ? 4 : undefined,
|
||||
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
|
||||
reporter: "html",
|
||||
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
||||
use: {
|
||||
/* Base URL to use in actions like `await page.goto('/')`. */
|
||||
baseURL: "http://0.0.0.0:3500",
|
||||
baseURL: "http://localhost:3000",
|
||||
|
||||
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
||||
trace: "on-first-retry",
|
||||
|
||||
locale: "en-US"
|
||||
locale: "en-US",
|
||||
},
|
||||
|
||||
/* Configure projects for major browsers */
|
||||
|
@ -42,8 +42,9 @@ export default defineConfig({
|
|||
|
||||
/* Run your local dev server before starting the tests */
|
||||
webServer: {
|
||||
timeout: 2 * 60 * 1000,
|
||||
command: "yarn e2e:server",
|
||||
url: "http://0.0.0.0:3500",
|
||||
url: "http://localhost:3000",
|
||||
reuseExistingServer: !process.env.CI,
|
||||
},
|
||||
});
|
||||
|
|
|
@ -27,6 +27,6 @@ export class BaseWebSocketPage extends BasePage {
|
|||
* @returns {Promise<MockWebSocketHelper>}
|
||||
*/
|
||||
async waitForNotificationsWebSocket() {
|
||||
return this.waitForWebSocket("ws://0.0.0.0:3500/ws/notifications");
|
||||
return this.waitForWebSocket("ws://localhost:3000/ws/notifications");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ import { fileURLToPath } from "url";
|
|||
import path from "path";
|
||||
|
||||
const app = express();
|
||||
const port = 3500;
|
||||
const port = 3000;
|
||||
|
||||
const staticPath = path.join(fileURLToPath(import.meta.url), "../../resources/public");
|
||||
app.use(express.static(staticPath));
|
||||
|
|
Loading…
Reference in a new issue