import { defineConfig, devices } from '@playwright/test'; /** * M2 #65 — Playwright visual evidence against local vite preview (not ubudual). * Artifacts land in tests/e2e/artifacts/ (png churn gitignored; README committed). */ export default defineConfig({ testDir: './tests/e2e', fullyParallel: true, forbidOnly: !!process.env.CI, retries: 0, workers: 2, timeout: 30_000, expect: { timeout: 4_000 }, reporter: [['list'], ['html', { open: 'never', outputFolder: 'tests/e2e/playwright-report' }]], use: { baseURL: 'http://127.0.0.1:4173', trace: 'retain-on-failure', screenshot: 'only-on-failure', video: 'off', ...devices['Pixel 7'], }, webServer: { command: 'npm run build && npm run preview -- --host 127.0.0.1 --port 4173', url: 'http://127.0.0.1:4173', reuseExistingServer: !process.env.CI, timeout: 180_000, }, outputDir: 'tests/e2e/test-results', });