-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplaywright.demo.config.ts
More file actions
54 lines (52 loc) · 1.73 KB
/
Copy pathplaywright.demo.config.ts
File metadata and controls
54 lines (52 loc) · 1.73 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import { defineConfig, devices } from "@playwright/test";
/**
* Dedicated Playwright configuration for the marketing demo recording.
*
* This config is **opt-in** and is never exercised by the regression
* suite (the main ``playwright.config.ts`` explicitly ignores
* ``demo/demo.spec.ts``). It is driven by ``scripts/make-demo-gif.mjs``
* (``npm run demo:gif``), which runs the single scripted demo, capturing
* lossless per-frame PNGs via the DevTools screencast API, then assembles
* them into an optimised animated GIF with ffmpeg.
*
* The viewport is fixed to a 16:10 desktop frame so the recording is
* deterministic; the ``high`` quality profile emits the GIF at this native
* 1280x800 capture resolution. Playwright's own WebM recording is disabled
* (the screencast frames are the only source).
*/
const VIEWPORT = { width: 1280, height: 800 };
export default defineConfig({
testDir: "./tests/e2e",
testMatch: [/demo[\\/]demo\.spec\.ts/],
outputDir: "./test-results/demo",
// The demo drives a full Pyodide boot (~30-60 s) plus several
// computation round-trips. 4 minutes is plenty for a healthy run while
// still failing fast if a selector hangs (instead of waiting 10 min).
timeout: 240_000,
expect: { timeout: 30_000 },
fullyParallel: false,
workers: 1,
retries: 0,
reporter: [["list"]],
use: {
baseURL: "http://localhost:5173",
viewport: VIEWPORT,
trace: "off",
screenshot: "off",
video: "off",
},
projects: [
{
name: "demo",
use: { ...devices["Desktop Chrome"], viewport: VIEWPORT },
},
],
webServer: {
command: "npm run dev",
url: "http://localhost:5173",
reuseExistingServer: true,
timeout: 60_000,
stdout: "ignore",
stderr: "pipe",
},
});