import { defineConfig } from '@playwright/test'; // e2e runs against the dev server (vite :5173), which proxies /api to a backend // instance pointed at the isolated `loft_test` database (see .env.test). export default defineConfig({ testDir: './e2e', testMatch: '**/*.e2e.{ts,js}', fullyParallel: false, workers: 1, use: { baseURL: 'http://localhost:5173', trace: 'on-first-retry' }, webServer: [ { // backend on :3000, pointed at the test DB via .env.test command: 'cd ../backend && set -a && . ./.env.test && set +a && cargo run', url: 'http://localhost:3000/health', reuseExistingServer: true, timeout: 180_000, stdout: 'pipe', stderr: 'pipe' }, { command: 'pnpm dev', url: 'http://localhost:5173', reuseExistingServer: true, timeout: 60_000 } ] });