diff options
| author | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-06-22 15:11:57 -0700 |
|---|---|---|
| committer | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-06-22 15:11:57 -0700 |
| commit | 8c982759f0bd9f1d09798a8b732c374e833705a5 (patch) | |
| tree | fc301ef14feae050fe58c5a75af2aba8720c4f35 /frontend/playwright.config.ts | |
| parent | e66c7b9171c8c08da38120490bed15a9b877d222 (diff) | |
test: add Playwright E2E suite for News tab
Diffstat (limited to 'frontend/playwright.config.ts')
| -rw-r--r-- | frontend/playwright.config.ts | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/frontend/playwright.config.ts b/frontend/playwright.config.ts new file mode 100644 index 0000000..6272c6e --- /dev/null +++ b/frontend/playwright.config.ts @@ -0,0 +1,29 @@ +import { defineConfig, devices } from "@playwright/test"; + +export default defineConfig({ + testDir: "./e2e", + outputDir: "./e2e/test-results", + fullyParallel: true, + forbidOnly: Boolean(process.env.CI), + retries: process.env.CI ? 2 : 0, + reporter: "list", + use: { + baseURL: "http://127.0.0.1:3001", + trace: "on-first-retry" + }, + webServer: { + command: "NEXT_PUBLIC_API_BASE_URL=http://127.0.0.1:8001 npm run dev -- --hostname 127.0.0.1 --port 3001", + url: "http://127.0.0.1:3001", + reuseExistingServer: !process.env.CI, + timeout: 120_000 + }, + projects: [ + { + name: "chromium-desktop", + use: { + ...devices["Desktop Chrome"], + viewport: { width: 1280, height: 720 } + } + } + ] +}); |
