bilhej/frontend/playwright.config.ts
Joakim Mörling 144791b7e6
All checks were successful
CI / Lint, type check, unit tests, coverage (pull_request) Successful in 2m8s
CI / E2E browser tests (pull_request) Successful in 1m2s
Fix deferred-payment E2E failures under parallel CI workers.
Remove the brittle filter-empty assertion from admin search helpers.
Run deferred-payment-admin in an isolated Playwright project with one
worker so serial tests keep shared order state. Stabilize unpaid-order
lookup by searching order id first, then plate text from the admin row.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-26 13:45:16 +02:00

37 lines
815 B
TypeScript

import { defineConfig } from '@playwright/test'
const isCI = !!process.env.PLAYWRIGHT_BASE_URL
export default defineConfig({
testDir: './e2e',
timeout: 30_000,
retries: 0,
use: {
baseURL: process.env.PLAYWRIGHT_BASE_URL || 'http://localhost:3000',
headless: true,
},
...(isCI
? {}
: {
webServer: {
command: 'npm run dev',
port: 3000,
reuseExistingServer: true,
timeout: 30_000,
},
}),
projects: [
{
name: 'chromium',
testIgnore: '**/deferred-payment-admin.spec.ts',
use: { browserName: 'chromium' },
},
{
name: 'chromium-serial',
testMatch: '**/deferred-payment-admin.spec.ts',
fullyParallel: false,
workers: 1,
use: { browserName: 'chromium' },
},
],
})