diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index fe92e0d7..f3790761 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -12,12 +12,9 @@ jobs: - uses: actions/checkout@v4 - uses: pnpm/action-setup@v4 - with: - version: 9.6.0 - uses: actions/setup-node@v4 with: - node-version: 22 cache: "pnpm" - name: Install dependencies @@ -27,7 +24,7 @@ jobs: run: pnpm exec playwright install --with-deps - name: Run Playwright tests - run: pnpm exec playwright test + run: pnpm test - uses: actions/upload-artifact@v4 if: always() diff --git a/.gitignore b/.gitignore index 94769fa8..a2c4008c 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ public/dist .vscode !.vscode/extensions.json .idea +playwright-report +test-results diff --git a/package.json b/package.json index 9b4e2d4f..b8f28abb 100644 --- a/package.json +++ b/package.json @@ -48,4 +48,4 @@ } } } -} +} \ No newline at end of file diff --git a/tests/package.json b/tests/package.json index cdf0cced..369aa249 100644 --- a/tests/package.json +++ b/tests/package.json @@ -3,11 +3,12 @@ "version": "0.0.0", "private": true, "scripts": { - "test": "playwright test --repeat-each=100" + "test_full": "playwright test --repeat-each=100", + "test": "playwright test" }, "devDependencies": { "@playwright/test": "catalog:", "@tietokilta/config-typescript": "workspace:*", "@types/node": "catalog:" } -} +} \ No newline at end of file diff --git a/tests/playwright.config.ts b/tests/playwright.config.ts index ebeae534..728302aa 100644 --- a/tests/playwright.config.ts +++ b/tests/playwright.config.ts @@ -63,9 +63,10 @@ export default defineConfig({ ], /* Run your local dev server before starting the tests */ - // webServer: { - // command: 'npm run start', - // url: 'http://127.0.0.1:3000', - // reuseExistingServer: !process.env.CI, - // }, + webServer: { + command: 'pnpm -C ../ dev', + url: 'http://127.0.0.1:3000', + timeout: 300 * 1000, + //reuseExistingServer: !process.env.CI, + }, });