pediatric-ai-scribe-v3/e2e/playwright.config.js
Daniel 146ac73da2 test(e2e): run full suite at mobile viewport too (Pixel 5)
Adds a second Playwright project so every calculator test runs at both
Desktop Chrome and Pixel 5 (~375 px). Catches mobile layout regressions
automatically. 106 tests passing (53 × 2 viewports).
2026-04-20 23:21:32 +02:00

26 lines
888 B
JavaScript

// Playwright config — runs smoke tests against the already-running PedScribe
// container (no dev server spin-up). Expects BASE_URL (default
// http://host.docker.internal:3552 when run via scripts/e2e.sh).
const { defineConfig, devices } = require('@playwright/test');
module.exports = defineConfig({
testDir: './tests',
timeout: 30_000,
expect: { timeout: 5_000 },
fullyParallel: false,
retries: 0,
workers: 1,
reporter: [['list']],
use: {
baseURL: process.env.BASE_URL || 'http://host.docker.internal:3552',
trace: 'retain-on-failure',
screenshot: 'only-on-failure',
actionTimeout: 5_000,
navigationTimeout: 15_000,
},
projects: [
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
// Mobile pass — catches layout regressions at ~375 px (iPhone SE)
{ name: 'mobile-chrome', use: { ...devices['Pixel 5'] } },
],
});