import { defineConfig, devices } from '@playwright/test'; /** * Read environment variables from file. * https://playwright.dev/docs/test-configuration#launching-the-player */ function getDisplayValue(value: string | undefined) { return value === undefined ? '1' : value; } export default defineConfig({ testDir: './tests/e2e', fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, workers: process.env.CI ? 1 : undefined, reporter: 'html', use: { baseURL: 'http://localhost:8000', trace: 'on-first-retry', headless: true, screenshot: 'only-on-failure', video: 'retain-on-failure', }, projects: [ { name: 'chromium', use: { ...devices['Desktop Chrome'] }, }, ], });