import { defineConfig } from '@playwright/test' // UI tests run against the Vite dev server, which proxies /api to a backend started // with a throw-away SQLite database and a known bootstrap admin. export default defineConfig({ testDir: './e2e', timeout: 30_000, fullyParallel: false, workers: 1, reporter: 'list', use: { baseURL: 'http://127.0.0.1:5173', trace: 'retain-on-failure' }, webServer: [ { command: 'cargo run -q -p api', cwd: '../backend', url: 'http://127.0.0.1:8080/healthz', reuseExistingServer: false, timeout: 180_000, env: { DATABASE_URL: 'sqlite::memory:', JWT_SECRET: 'e2e-test-secret-do-not-use-in-production', MASTER_KEY: '000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f', FAKE_HOST: 'true', LOGIN_RATE_LIMIT: '1000', BOOTSTRAP_ADMIN_EMAIL: 'admin@example.com', BOOTSTRAP_ADMIN_PASSWORD: 'admin-password-123', BIND: '127.0.0.1:8080', RUST_LOG: 'warn', }, }, { command: 'npm run dev', url: 'http://127.0.0.1:5173', reuseExistingServer: false, timeout: 60_000 }, ], })