Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,11 @@ jobs:

- name: 🧪 Tests
run: pnpm test

- name: 🎭 Install Playwright browsers
run: pnpm exec playwright install --with-deps chromium
working-directory: ./apps/status-page

- name: 🎭 Run E2E tests
run: pnpm e2e
working-directory: ./apps/status-page
5 changes: 5 additions & 0 deletions apps/status-page/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
.vercel

# Playwright
/test-results/
/playwright-report/
/playwright/.cache/
7 changes: 7 additions & 0 deletions apps/status-page/e2e/smoke.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { expect, test } from "@playwright/test";

test("seeded status page renders for /acme/en", async ({ page }) => {
const response = await page.goto("/acme/en");
expect(response?.status()).toBe(200);
await expect(page.getByText("Acme Inc.")).toBeVisible();
});
2 changes: 2 additions & 0 deletions apps/status-page/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"start": "next start",
"lint": "next lint",
"test": "bun test",
"e2e": "playwright test",
"tsc": "tsc --noEmit"
},
"dependencies": {
Expand Down Expand Up @@ -77,6 +78,7 @@
},
"devDependencies": {
"@openstatus/tsconfig": "workspace:*",
"@playwright/test": "1.60.0",
"@tailwindcss/postcss": "4.1.11",
"@tailwindcss/typography": "0.5.10",
"@types/dom-speech-recognition": "0.0.6",
Expand Down
24 changes: 24 additions & 0 deletions apps/status-page/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { defineConfig, devices } from "@playwright/test";

const PORT = Number(process.env.PORT ?? 3003);
const baseURL = `http://localhost:${PORT}`;

export default defineConfig({
testDir: "./e2e",
fullyParallel: true,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
reporter: "list",
use: {
baseURL,
trace: "on-first-retry",
},
projects: [{ name: "chromium", use: { ...devices["Desktop Chrome"] } }],
webServer: {
command: "pnpm dev",
env: { PORT: String(PORT) },
url: baseURL,
reuseExistingServer: !process.env.CI,
timeout: 120_000,
},
});
Loading