// @ts-check const { defineConfig } = require('@playwright/test'); /** * E2E config: serves the production build (dist/) on a local static server. * Always run `./build.sh` (npm run build) before `npm test` so the tests * exercise the exact artifact that gets deployed. */ module.exports = defineConfig({ testDir: './tests/e2e', timeout: 20000, retries: 0, workers: 1, reporter: [['list'], ['html', { open: 'never' }]], use: { baseURL: 'http://127.0.0.1:8123', viewport: { width: 1440, height: 900 }, }, webServer: { command: 'python3 -m http.server 8123 --bind 127.0.0.1 --directory dist', url: 'http://127.0.0.1:8123/index.html', reuseExistingServer: !process.env.CI, timeout: 15000, }, projects: [ { name: 'chromium', use: { browserName: 'chromium' } }, ], });