Files
archy/packages/app/playwright.config.ts
T
DorianandClaude Opus 4.6 18b972b351 feat(devx): developer experience & quality (M19.1-M19.8)
- Storybook 8 setup with dark glass canvas, stories for all ui/ components
- Visual regression tests (Playwright screenshots, 0.5% pixel diff)
- Bundle size CI gate (fail > 250KB gzipped)
- Comprehensive mock data: 20+ items for films, songs, books, TV, images,
  places, podcasts, news, nostr events; mock TMDB responses
- E2E cross-browser matrix: Chromium + Firefox + WebKit + iPhone 14 + Galaxy S21
- Proxy integration tests (SSE format, tool_use, error handling, disconnect)
- Lighthouse CI config (LCP < 3s, CLS < 0.15)
- Dependency audit: weekly GitHub Actions workflow with license checker
- CI workflow: lint, typecheck, test, bundle size, e2e, lighthouse, audit

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 01:15:39 +00:00

50 lines
1.3 KiB
TypeScript

import { defineConfig, devices } from '@playwright/test'
export default defineConfig({
testDir: './e2e',
fullyParallel: false,
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 2 : 0,
workers: 1,
globalSetup: './e2e/global-setup.ts',
globalTeardown: './e2e/global-teardown.ts',
reporter: 'html',
snapshotPathTemplate: '{testDir}/__screenshots__/{projectName}/{testFilePath}/{arg}{ext}',
expect: {
toHaveScreenshot: { maxDiffPixelRatio: 0.005 },
},
use: {
baseURL: 'http://localhost:5173',
trace: 'on-first-retry',
},
projects: [
// Desktop browsers
{ name: 'chromium', use: { ...devices['Desktop Chrome'] } },
{ name: 'firefox', use: { ...devices['Desktop Firefox'] } },
{ name: 'webkit', use: { ...devices['Desktop Safari'] } },
// Mobile viewports
{
name: 'iphone14',
use: {
...devices['iPhone 14'],
viewport: { width: 390, height: 844 },
},
},
{
name: 'galaxy-s21',
use: {
userAgent: 'Mozilla/5.0 (Linux; Android 12; SM-G991B) AppleWebKit/537.36',
viewport: { width: 360, height: 800 },
deviceScaleFactor: 3,
isMobile: true,
hasTouch: true,
},
},
],
webServer: {
command: 'pnpm run dev:vite',
url: 'http://localhost:5173',
reuseExistingServer: true,
},
})