import { defineConfig, devices } from '@playwright/test'; export default defineConfig({ testDir: './e2e', fullyParallel: true, reporter: [['list']], use: { baseURL: 'http://localhost:3001', trace: 'on-first-retry', }, webServer: [ { command: 'sh -c \'DATABASE_URL="${DATABASE_URL:-postgresql://surclaw:surclaw_dev_password@localhost:5433/surclaw?schema=public}" npx prisma migrate deploy --schema server/prisma/schema.prisma && DATABASE_URL="${DATABASE_URL:-postgresql://surclaw:surclaw_dev_password@localhost:5433/surclaw?schema=public}" npm run prisma:seed && API_PORT=3100 DATABASE_URL="${DATABASE_URL:-postgresql://surclaw:surclaw_dev_password@localhost:5433/surclaw?schema=public}" npm run server:dev\'', url: 'http://localhost:3100/api/health', reuseExistingServer: true, timeout: 120_000, }, { command: 'VITE_API_PROXY_TARGET=http://localhost:3100 npm run dev', url: 'http://localhost:3001', reuseExistingServer: true, timeout: 120_000, }, ], projects: [ { name: 'chromium', use: { ...devices['Desktop Chrome'] }, }, ], });