import { defineConfig } from '@playwright/test'; import dotenv from 'dotenv'; import path from 'path'; // Load e2e/.env.test if it exists (contains OPENAI_TEST_API_KEY) dotenv.config({ path: path.resolve(__dirname, '.env.test') }); /** * Playwright configuration for AI Weekly Synth E2E tests. * * Tests run against the Docker-composed stack on http://localhost:8080. * A single worker is used to avoid parallel DB state mutations. */ export default defineConfig({ testDir: './tests', timeout: 30_000, retries: 1, workers: 1, use: { baseURL: 'http://localhost:8080', screenshot: 'only-on-failure', trace: 'on-first-retry', }, projects: [ { name: 'chromium', use: { browserName: 'chromium', }, }, ], });