import { defineConfig, devices } from '@playwright/test'; const channel = process.env.CI ? undefined : 'chrome'; export default defineConfig({ testDir: './e2e', timeout: 60_000, expect: { timeout: 10_000 }, fullyParallel: true, forbidOnly: Boolean(process.env.CI), retries: process.env.CI ? 2 : 0, reporter: process.env.CI ? [['list'], ['html', { open: 'never' }], ['junit', { outputFile: 'test-results/e2e.xml' }]] : [['list'], ['html', { open: 'never' }]], use: { baseURL: 'http://127.0.0.1:4173', trace: 'on-first-retry', screenshot: 'only-on-failure', channel, }, projects: [ { name: 'chromium', use: { ...devices['Desktop Chrome'], channel }, }, ], webServer: { command: 'node node_modules/vite/bin/vite.js preview --host 127.0.0.1 --port 4173 --strictPort', cwd: 'apps/web', url: 'http://127.0.0.1:4173/login', reuseExistingServer: false, timeout: 60_000, stdout: 'ignore', stderr: 'pipe', }, });