- CLAUDE.md: remove Redis constraint, ioredis library row, Redis architecture sentence, update compose comment - README.md: remove Redis from prereqs, quick-start command, compose description, tech-stack live-sync row - docs/ARCHITECTURE.md: delete Redis infrastructure table row - docs/CONFIGURATION.md: remove Redis localhost:6379 mention from dev section - docs/deployment.md: delete redis services table row - docs/DEVELOPMENT.md: remove prereq mention, heading, two up commands, expose bullet, stack comment - docs/GETTING-STARTED.md: prereq row, up command, prose mention - docs/TESTING.md: 'API and MariaDB' (was API, MariaDB, and Redis) - apps/pwa/e2e/README.md: delete Redis on :6379 bullet - apps/pwa/playwright.config.ts: two comments updated (API+MariaDB, not API+MariaDB+Redis)
75 lines
2.5 KiB
TypeScript
75 lines
2.5 KiB
TypeScript
/**
|
||
* Playwright configuration — Phase 7 Mobile Test Harness + Phase 14 Desktop
|
||
*
|
||
* Three-profile device matrix: iPhone 14/WebKit + Pixel 7/Chromium + Desktop Chrome
|
||
* Auth: DEV_AUTH_BYPASS=true on the API (never storageState — D-01/Pitfall 14)
|
||
* SW: serviceWorkers: 'block' on all profiles (D-02/Pitfall 15)
|
||
* baseURL: env-driven PLAYWRIGHT_BASE_URL (D-08/Rule 8)
|
||
* webServer: manages Vite only — API+MariaDB stay compose-managed (D-10)
|
||
*
|
||
* Run:
|
||
* pnpm --filter @familysync/pwa test:e2e
|
||
* pnpm --filter @familysync/pwa exec playwright test --project=pixel
|
||
* pnpm --filter @familysync/pwa exec playwright test --project=desktop
|
||
*/
|
||
import { defineConfig, devices } from '@playwright/test';
|
||
|
||
export default defineConfig({
|
||
testDir: './e2e',
|
||
testMatch: '**/*.spec.ts',
|
||
fullyParallel: true,
|
||
retries: process.env.CI ? 2 : 0,
|
||
workers: process.env.CI ? 1 : undefined,
|
||
reporter: process.env.CI ? 'github' : 'list',
|
||
|
||
// Plan 02 creates this file — forward-declared, resolves at runtime
|
||
globalSetup: './e2e/global-setup.ts',
|
||
|
||
use: {
|
||
// env-driven per D-08/Rule 8 — never a hardcoded host
|
||
baseURL: process.env.PLAYWRIGHT_BASE_URL ?? 'http://localhost:5173',
|
||
trace: 'on-first-retry',
|
||
video: 'on-first-retry',
|
||
screenshot: 'only-on-failure',
|
||
},
|
||
|
||
projects: [
|
||
{
|
||
// iPhone 14: 390×844 viewport, WebKit engine, Mobile Safari UA, hasTouch: true
|
||
// Device descriptor confirmed: playwright deviceDescriptorsSource.json
|
||
name: 'iphone',
|
||
use: {
|
||
...devices['iPhone 14'],
|
||
// serviceWorkers: 'block' prevents the injectManifest sw.js (Workbox) from
|
||
// intercepting requests — satisfies D-02 / Pitfall 15
|
||
serviceWorkers: 'block',
|
||
},
|
||
},
|
||
{
|
||
// Pixel 7: 412×915 viewport, Chromium engine, Chrome Android UA, hasTouch: true
|
||
name: 'pixel',
|
||
use: {
|
||
...devices['Pixel 7'],
|
||
serviceWorkers: 'block',
|
||
},
|
||
},
|
||
{
|
||
// Desktop Chrome: 1280×720 viewport, Chromium engine, no hasTouch (D-06)
|
||
name: 'desktop',
|
||
use: {
|
||
...devices['Desktop Chrome'],
|
||
serviceWorkers: 'block',
|
||
},
|
||
},
|
||
],
|
||
|
||
// D-10: manage Vite only; API+MariaDB are compose-managed
|
||
// reuseExistingServer: reuse operator's pnpm dev locally; start fresh in CI
|
||
webServer: {
|
||
command: 'pnpm --filter @familysync/pwa dev',
|
||
url: process.env.PLAYWRIGHT_BASE_URL ?? 'http://localhost:5173',
|
||
reuseExistingServer: !process.env.CI,
|
||
timeout: 120_000,
|
||
},
|
||
});
|