Pre-execution baseline for the mobile foundation PR: - Mobile audit harness (tests/e2e/audit/mobile.spec.ts + mobile-audit Playwright project) — visits every page at four anchor iPhone viewports (375/393/402/440), screenshots full-page to .audit/mobile/, generates index.md - Design spec (docs/superpowers/specs/2026-04-29-mobile-optimization-design.md) — adaptive shell + responsive content; full active-iPhone-range coverage; foundation + per-page migration phases - Implementation plan (docs/superpowers/plans/2026-04-29-mobile-foundation.md) — 24 TDD tasks for the foundation PR - .gitignore: ignore /client-portal/ (legacy nested Nuxt repo) and /.audit/ (regenerable screenshots) - Remove phantom client-portal gitlink (mode 160000 with no .gitmodules) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
99 lines
2.7 KiB
TypeScript
99 lines
2.7 KiB
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
|
|
export default defineConfig({
|
|
testDir: './tests/e2e',
|
|
fullyParallel: false,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: 0,
|
|
workers: 1, // Sequential — so tests can build on each other
|
|
reporter: [['list'], ['html', { open: 'never' }]],
|
|
timeout: 60_000,
|
|
expect: { timeout: 10_000 },
|
|
|
|
use: {
|
|
baseURL: 'http://localhost:3000',
|
|
trace: 'on-first-retry',
|
|
screenshot: 'only-on-failure',
|
|
video: 'retain-on-failure',
|
|
actionTimeout: 15_000,
|
|
navigationTimeout: 30_000,
|
|
},
|
|
|
|
projects: [
|
|
{
|
|
name: 'setup',
|
|
testMatch: /smoke\/global-setup\.ts/,
|
|
},
|
|
{
|
|
name: 'smoke',
|
|
testMatch: /smoke\/\d{2}-.*\.spec\.ts/,
|
|
dependencies: ['setup'],
|
|
use: {
|
|
...devices['Desktop Chrome'],
|
|
viewport: { width: 1440, height: 900 },
|
|
},
|
|
},
|
|
{
|
|
name: 'exhaustive',
|
|
testMatch: /exhaustive\/.*\.spec\.ts/,
|
|
dependencies: ['setup'],
|
|
use: {
|
|
...devices['Desktop Chrome'],
|
|
viewport: { width: 1440, height: 900 },
|
|
},
|
|
},
|
|
{
|
|
name: 'destructive',
|
|
testMatch: /destructive\/.*\.spec\.ts/,
|
|
dependencies: ['setup'],
|
|
use: {
|
|
...devices['Desktop Chrome'],
|
|
viewport: { width: 1440, height: 900 },
|
|
},
|
|
},
|
|
{
|
|
// Real-API tests hit live external services (Documenso, IMAP, etc.).
|
|
// Opt-in only: pnpm exec playwright test --project=realapi
|
|
name: 'realapi',
|
|
testMatch: /realapi\/.*\.spec\.ts/,
|
|
dependencies: ['setup'],
|
|
timeout: 120_000,
|
|
use: {
|
|
...devices['Desktop Chrome'],
|
|
viewport: { width: 1440, height: 900 },
|
|
},
|
|
},
|
|
{
|
|
// Visual regression baselines. Regenerate with --update-snapshots after
|
|
// intentional UI changes; otherwise pnpm exec playwright test --project=visual
|
|
// diffs against the committed PNGs.
|
|
name: 'visual',
|
|
testMatch: /visual\/.*\.spec\.ts/,
|
|
dependencies: ['setup'],
|
|
use: {
|
|
...devices['Desktop Chrome'],
|
|
viewport: { width: 1440, height: 900 },
|
|
},
|
|
},
|
|
{
|
|
// Mobile / tablet audit — visits every page in headed Chromium at iPhone
|
|
// viewports (portrait), screenshots full-page to .audit/mobile/<viewport>/,
|
|
// and writes an index.md. Depends on `setup` for seeded admin + port-role.
|
|
name: 'mobile-audit',
|
|
testMatch: /audit\/mobile\.spec\.ts/,
|
|
dependencies: ['setup'],
|
|
timeout: 600_000,
|
|
use: {
|
|
headless: false,
|
|
launchOptions: { slowMo: 200 },
|
|
screenshot: 'off',
|
|
video: 'off',
|
|
trace: 'off',
|
|
},
|
|
},
|
|
],
|
|
|
|
// Don't start the dev server — we expect it to already be running
|
|
webServer: undefined,
|
|
});
|