diff --git a/.github/workflows/check-build.yml b/.github/workflows/check-build.yml index 25ca74503..0fd77f081 100644 --- a/.github/workflows/check-build.yml +++ b/.github/workflows/check-build.yml @@ -23,7 +23,7 @@ jobs: - name: Build app run: npm run build - name: Run Playwright build smoke test - run: npm run test:e2e -- --project chromium --config playwright.buildSmoke.config.ts tests/e2e/buildSmoke.spec.ts + run: npm run test:e2e -- --project chromium --config playwright.buildSmoke.config.ts - uses: actions/upload-artifact@v3 if: always() with: diff --git a/.gitignore b/.gitignore index 1610fb1cf..b2f24f3a8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ -build/ +/build/ node_modules/ NOTES diff --git a/playwright.buildSmoke.config.ts b/playwright.buildSmoke.config.ts index 28808c6d3..0ae0b7168 100644 --- a/playwright.buildSmoke.config.ts +++ b/playwright.buildSmoke.config.ts @@ -4,6 +4,7 @@ import base from "./playwright.config.js"; const config: PlaywrightTestConfig = { ...base, + testDir: "./tests/build", use: { ...base.use, baseURL: "http://localhost:4173", diff --git a/tests/e2e/buildSmoke.spec.ts b/tests/build/smoke.spec.ts similarity index 71% rename from tests/e2e/buildSmoke.spec.ts rename to tests/build/smoke.spec.ts index 9e8b6720b..f4f5207bf 100644 --- a/tests/e2e/buildSmoke.spec.ts +++ b/tests/build/smoke.spec.ts @@ -1,11 +1,6 @@ import { test, expect } from "@tests/support/fixtures.js"; -test("exceptions in production build", async ({ page, browserName }) => { - // It's enough to check this once. - if (browserName !== "chromium") { - test.skip(); - } - +test("exceptions in production build", async ({ page }) => { await page.goto("/"); // Wait for scripts to finish executing, there might be exceptions that // happen after the page has been painted.