import { defineConfig, devices } from '@playwright/test'; const E2E_PORT = Number(process.env.E2E_PORT ?? 4173); const E2E_ORIGIN = `http://127.0.0.1:${E2E_PORT}`; export default defineConfig({ testDir: './e2e', fullyParallel: true, forbidOnly: Boolean(process.env.CI), retries: process.env.CI ? 2 : 0, reporter: 'list', timeout: 60_000, use: { baseURL: E2E_ORIGIN, trace: 'on-first-retry', screenshot: 'only-on-failure', }, webServer: { command: `pnpm run copy:brand && vite --clearScreen false --host 127.0.0.1 --port ${E2E_PORT} --strictPort`, url: E2E_ORIGIN, reuseExistingServer: !process.env.CI, timeout: 120_000, }, projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }], });