Radish alpha
r
Radicle web interface
Radicle
Git (anonymous pull)
Log in to clone via SSH
Move build smoke tests to a separate folder
Rūdolfs Ošiņš committed 3 years ago
commit d5f690926ef30f7c9ce5cc2dd2c4206c3cdfa11b
parent 836b0ccc09b989437c3b95dbeeba4eab175a8259
5 files changed +16 -20
modified .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:
modified .gitignore
@@ -1,4 +1,4 @@
-
build/
+
/build/
node_modules/
NOTES

modified 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",
added tests/build/smoke.spec.ts
@@ -0,0 +1,13 @@
+
import { test, expect } from "@tests/support/fixtures.js";
+

+
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.
+
  await page.waitForTimeout(2000);
+
  await expect(
+
    page.locator(
+
      "text=Radicle enables developers to securely collaborate on software over a peer-to-peer network built on Git.",
+
    ),
+
  ).toBeVisible();
+
});
deleted tests/e2e/buildSmoke.spec.ts
@@ -1,18 +0,0 @@
-
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();
-
  }
-

-
  await page.goto("/");
-
  // Wait for scripts to finish executing, there might be exceptions that
-
  // happen after the page has been painted.
-
  await page.waitForTimeout(2000);
-
  await expect(
-
    page.locator(
-
      "text=Radicle enables developers to securely collaborate on software over a peer-to-peer network built on Git.",
-
    ),
-
  ).toBeVisible();
-
});