diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b5cd21c1..1749673f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: - name: E2e tests run: | npx playwright install - npx playwright test .spec.ts + npm run 2e2 - name: Artifacts uses: actions/upload-artifact@v3 diff --git a/package.json b/package.json index e2ad5fe3..9c3967d8 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,8 @@ "build": "node build", "test": "npm run lint && npm run jest", "app": "node app/server.js", - "playwright": "npm run playwright test example.spec.ts --headed", + "playwright": "npx playwright test .spec.ts", + "e2e": "npm run app & npm run playwright", "prepack": "npm run build", "checkGit": "sh ./uncommited.sh", "prepublishOnly": "npm run checkGit && npm run test && npm run build && npm run checkGit" diff --git a/playwright.config.ts b/playwright.config.ts index 97b876c6..89203adb 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -29,7 +29,7 @@ export default defineConfig({ webServer: { command: 'npm run app', url: 'http://127.0.0.1:3000', - reuseExistingServer: !process.env.CI, + reuseExistingServer: true }, /* Configure projects for major browsers */