Skip to content

Commit efc7bdc

Browse files
committed
test(status-page): add Playwright PoC with landing page smoke test
Minimal Playwright setup in apps/status-page to unblock the framework decision in #1610. Single chromium-only smoke test that loads / and asserts the page title — keeps the PoC easy to approve or reject before investing in broader coverage (auth, monitor flows, CI integration).
1 parent 11f56ca commit efc7bdc

5 files changed

Lines changed: 135 additions & 66 deletions

File tree

apps/status-page/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
11
.vercel
2+
3+
# Playwright
4+
/test-results/
5+
/playwright-report/
6+
/playwright/.cache/

apps/status-page/e2e/smoke.spec.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { expect, test } from "@playwright/test";
2+
3+
test("landing page loads and shows the Status Page title", async ({ page }) => {
4+
await page.goto("/");
5+
await expect(page).toHaveTitle(/Status Page/);
6+
});

apps/status-page/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"start": "next start",
1010
"lint": "next lint",
1111
"test": "bun test",
12+
"e2e": "playwright test",
1213
"tsc": "tsc --noEmit"
1314
},
1415
"dependencies": {
@@ -77,6 +78,7 @@
7778
},
7879
"devDependencies": {
7980
"@openstatus/tsconfig": "workspace:*",
81+
"@playwright/test": "1.60.0",
8082
"@tailwindcss/postcss": "4.1.11",
8183
"@tailwindcss/typography": "0.5.10",
8284
"@types/dom-speech-recognition": "0.0.6",
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import { defineConfig, devices } from "@playwright/test";
2+
3+
const PORT = Number(process.env.PORT ?? 3003);
4+
const baseURL = `http://localhost:${PORT}`;
5+
6+
export default defineConfig({
7+
testDir: "./e2e",
8+
fullyParallel: true,
9+
forbidOnly: !!process.env.CI,
10+
retries: process.env.CI ? 2 : 0,
11+
reporter: "list",
12+
use: {
13+
baseURL,
14+
trace: "on-first-retry",
15+
},
16+
projects: [{ name: "chromium", use: { ...devices["Desktop Chrome"] } }],
17+
webServer: {
18+
command: "pnpm dev",
19+
env: { PORT: String(PORT) },
20+
url: baseURL,
21+
reuseExistingServer: !process.env.CI,
22+
timeout: 120_000,
23+
},
24+
});

0 commit comments

Comments
 (0)