import { defineConfig, devices } from '@playwright/test'; // Hermetic e2e: Playwright boots the Vite dev server in `mock` mode (the in-memory // fake transport), so the smoke needs no backend/gateway/Postgres. export default defineConfig({ testDir: './e2e', fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 1 : 0, reporter: 'list', use: { baseURL: 'http://localhost:4173', trace: 'on-first-retry', }, webServer: { command: 'pnpm exec vite --mode mock --port 4173 --strictPort', url: 'http://localhost:4173', reuseExistingServer: !process.env.CI, timeout: 60_000, }, // Run the same hermetic specs in Chromium and WebKit (Safari's engine) so the UI is // exercised in both rendering/JS engines. Note: desktop WebKit on Linux does not // reproduce iOS Safari's text auto-inflation, so the `text-size-adjust` guard in // app.css is not regression-covered here — but engine-level CSS/JS differences are. projects: [ { name: 'chromium', use: { ...devices['Desktop Chrome'] } }, { name: 'webkit', use: { ...devices['Desktop Safari'] } }, ], });