import { defineConfig, devices } from '@playwright/test' // D3 finance E2E: drives REAL browser WebAuthn (Chromium virtual authenticator) to enrol a // customer, then exercises the D3 /finance/v1 surface + UI (dashboard, intent assistant, // enumeration-safe recipient resolution) in a real browser, incl. Arabic/RTL, mobile and iPad // viewports. All money is simulated; RP ID is 'localhost' (physical-device coverage stays PENDING). const PORT = process.env.D3_E2E_PORT || '8000' const ORIGIN = `http://localhost:${PORT}` export default defineConfig({ testDir: './e2e', testMatch: 'd3-finance.spec.ts', fullyParallel: false, workers: 1, timeout: 60_000, reporter: [['list'], ['html', { open: 'never', outputFolder: 'playwright-report-d3' }]], use: { baseURL: ORIGIN, trace: 'retain-on-failure', }, projects: [ { name: 'chromium-desktop', use: { ...devices['Desktop Chrome'] } }, { name: 'chromium-mobile', use: { ...devices['Pixel 5'] } }, // iPad viewport on Chromium (CI installs Chromium only; the WebKit 'iPad Pro 11' profile // would require a WebKit browser). Emulates the tablet layout for the ATM kiosk. { name: 'chromium-ipad', use: { ...devices['Desktop Chrome'], viewport: { width: 834, height: 1194 }, hasTouch: true }, }, ], webServer: { command: 'bash e2e/d3-serve.sh', url: `${ORIGIN}/healthz`, timeout: 180_000, reuseExistingServer: true, stdout: 'pipe', stderr: 'pipe', }, })