-
Notifications
You must be signed in to change notification settings - Fork 945
Expand file tree
/
Copy pathplaywright.config.ts
More file actions
31 lines (29 loc) · 1.18 KB
/
Copy pathplaywright.config.ts
File metadata and controls
31 lines (29 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import {defineConfig, devices} from '@playwright/test';
// Browser tests for lottie sticker rendering.
//
// The first-frame / blink bug only reproduces in the REAL pipeline (SharedWorker + transferred
// OffscreenCanvas + the page compositor); jsdom/vitest can't render lottie at all, and a
// self-contained worker would be a *dedicated* worker with different commit timing. So these run
// against the actual dev server in a real browser. Lottie renders without login (the login page
// itself plays .tgs animations), so a plain HTTP Vite preview is enough - no auth/seed needed.
const PORT = 8099;
export default defineConfig({
testDir: './e2e',
fullyParallel: false,
workers: 1, // one sticker on screen at a time keeps the screenshot detector unambiguous
timeout: 60_000,
reporter: [['list']],
use: {
baseURL: `http://localhost:${PORT}/`,
headless: true,
viewport: {width: 800, height: 600}
},
projects: [{name: 'chromium', use: {...devices['Desktop Chrome']}}],
webServer: {
command: `pnpm exec vite --port ${PORT} --strictPort`,
url: `http://localhost:${PORT}/`,
env: {TWEB_PREVIEW: '1'},
reuseExistingServer: !process.env.CI,
timeout: 120_000
}
});