import { defineConfig, devices } from '@playwright/test'; /** * Convivo acceptance test suite. * * Runs against the locally-running stack: * - Convivo app (Vite dev) -> http://localhost:3000 * - Supabase (Kong) -> http://127.0.0.1:54321 * - Postgres container -> supabase_db_Convivo * * Start the stack first: * npm run db:start && npm run app:dev * * Tests run serially (workers: 1) because they share the demo database and * reset state between tests. Each test is self-contained: it resets the * relevant rows in `beforeEach` so execution order never matters. */ export default defineConfig({ testDir: './tests', timeout: 90_000, expect: { timeout: 15_000 }, fullyParallel: false, workers: 1, retries: 0, reporter: [ ['list'], ['html', { open: 'never', outputFolder: 'reports/html' }], ], use: { baseURL: process.env.CONVIVO_BASE_URL || 'http://localhost:3000', // Capture evidence for every failed test (spec ยง40). trace: 'retain-on-failure', screenshot: 'only-on-failure', video: 'retain-on-failure', actionTimeout: 15_000, navigationTimeout: 30_000, }, projects: [ { name: 'chromium', use: { ...devices['Desktop Chrome'] }, }, ], });