mirror of
https://github.com/penpot/penpot.git
synced 2025-01-23 06:58:58 -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 install
|
||||||
yarn test
|
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:
|
- run:
|
||||||
name: "backend tests"
|
name: "backend tests"
|
||||||
working_directory: "./backend"
|
working_directory: "./backend"
|
||||||
|
|
|
@ -18,18 +18,18 @@ export default defineConfig({
|
||||||
/* Retry on CI only */
|
/* Retry on CI only */
|
||||||
retries: process.env.CI ? 2 : 0,
|
retries: process.env.CI ? 2 : 0,
|
||||||
/* Opt out of parallel tests on CI. */
|
/* 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 to use. See https://playwright.dev/docs/test-reporters */
|
||||||
reporter: "html",
|
reporter: "html",
|
||||||
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
|
||||||
use: {
|
use: {
|
||||||
/* Base URL to use in actions like `await page.goto('/')`. */
|
/* 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 */
|
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
|
||||||
trace: "on-first-retry",
|
trace: "on-first-retry",
|
||||||
|
|
||||||
locale: "en-US"
|
locale: "en-US",
|
||||||
},
|
},
|
||||||
|
|
||||||
/* Configure projects for major browsers */
|
/* Configure projects for major browsers */
|
||||||
|
@ -42,8 +42,9 @@ export default defineConfig({
|
||||||
|
|
||||||
/* Run your local dev server before starting the tests */
|
/* Run your local dev server before starting the tests */
|
||||||
webServer: {
|
webServer: {
|
||||||
|
timeout: 2 * 60 * 1000,
|
||||||
command: "yarn e2e:server",
|
command: "yarn e2e:server",
|
||||||
url: "http://0.0.0.0:3500",
|
url: "http://localhost:3000",
|
||||||
reuseExistingServer: !process.env.CI,
|
reuseExistingServer: !process.env.CI,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -27,6 +27,6 @@ export class BaseWebSocketPage extends BasePage {
|
||||||
* @returns {Promise<MockWebSocketHelper>}
|
* @returns {Promise<MockWebSocketHelper>}
|
||||||
*/
|
*/
|
||||||
async waitForNotificationsWebSocket() {
|
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";
|
import path from "path";
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
const port = 3500;
|
const port = 3000;
|
||||||
|
|
||||||
const staticPath = path.join(fileURLToPath(import.meta.url), "../../resources/public");
|
const staticPath = path.join(fileURLToPath(import.meta.url), "../../resources/public");
|
||||||
app.use(express.static(staticPath));
|
app.use(express.static(staticPath));
|
||||||
|
|
Loading…
Add table
Reference in a new issue