From d5f690926ef30f7c9ce5cc2dd2c4206c3cdfa11b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Wed, 14 Dec 2022 11:29:45 +0100 Subject: [PATCH] Move build smoke tests to a separate folder MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rūdolfs Ošiņš --- .github/workflows/check-build.yml | 2 +- .gitignore | 2 +- playwright.buildSmoke.config.ts | 1 + tests/{e2e/buildSmoke.spec.ts => build/smoke.spec.ts} | 7 +------ 4 files changed, 4 insertions(+), 8 deletions(-) rename tests/{e2e/buildSmoke.spec.ts => build/smoke.spec.ts} (71%) 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.