import { defineConfig, devices } from '@playwright/test'; // Pointed at a local dev server by default. Override in CI with BASE_URL. // Start the web + api stack yourself (`pnpm dev` from repo root) before running `pnpm -C apps/e2e test`. const BASE_URL = process.env.BASE_URL ?? 'http://localhost:5173'; export default defineConfig({ testDir: './tests', timeout: 30_000, expect: { timeout: 5_000 }, fullyParallel: true, forbidOnly: Boolean(process.env.CI), retries: process.env.CI ? 2 : 0, reporter: [['list'], ['html', { open: 'never' }]], use: { baseURL: BASE_URL, trace: 'on-first-retry', screenshot: 'only-on-failure', }, projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }], });