import { defineConfig, devices } from '@playwright/test'; // E2E runs against the dev stack: postgres + backend must be up and seeded // (make dev / make seed); the vite dev server is reused or started here. export default defineConfig({ testDir: 'e2e', globalSetup: './e2e/global-setup.ts', globalTeardown: './e2e/global-teardown.ts', // One worker: every spec drives the same seeded user against one local // LLM, so parallel specs delete each other's in-flight conversations // (and queue behind the same model anyway). workers: 1, use: { baseURL: 'http://localhost:5173', // The specs assert English copy, so the language the interface picks // has to be pinned rather than inherited from whatever the machine // running the suite happens to send. Accept-Language is the strategy // that applies to a visitor with no account preference and no cookie. // A seeded user who HAS picked a language keeps it (that is the product // rule), so anything that runs as such a user selects by testid. locale: 'en-US', extraHTTPHeaders: { 'Accept-Language': 'en-US,en;q=0.9' } }, projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }], webServer: { command: 'npm run dev', port: 5173, reuseExistingServer: true } });