import { defineConfig, devices } from '@playwright/test' // E2E config — drives a real Vite dev server + a real Laravel test // server. Used by `pnpm test:e2e`. Component tests live in // playwright-ct.config.ts (different runner). export default defineConfig({ testDir: './tests/playwright-e2e', fullyParallel: false, forbidOnly: !!process.env.CI, retries: 0, workers: 1, reporter: process.env.CI ? 'github' : 'list', use: { baseURL: process.env.E2E_FRONTEND_URL ?? 'http://localhost:5173', trace: 'off', video: 'off', screenshot: 'off', viewport: { width: 1440, height: 900 }, }, projects: [ { name: 'chromium', use: { ...devices['Desktop Chrome'] }, }, ], // Auto-start the SPA dev server. Laravel's test server is started // by the per-test fixture in tests/playwright-e2e/fixtures/laravel.ts // because its lifecycle requires per-run seed control. webServer: { command: 'pnpm dev', url: process.env.E2E_FRONTEND_URL ?? 'http://localhost:5173', reuseExistingServer: !process.env.CI, timeout: 120_000, stdout: 'ignore', stderr: 'pipe', }, })