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
55
56
57
58
59
60
61
62
63
64
65
// Shared Playwright fixture that seeds the terminal renderer per project so
// each spec runs under BOTH the xterm-default and the sterk-experimental
// renderers without inline boilerplate in every test file.
//
// The renderer is a server-held preference now (#211), not a per-device
// localStorage key, so the seed is a PUT to /api/settings/preferences against
// the instance under test. It writes a clean default blob with the project's
// renderer, giving every test a known preferences baseline (the old
// localStorage.clear() + reseed, moved server-side). The suite runs workers=1,
// so this global row is never raced.
//
// Only seeds when MOBUX_URL is set (the smoke/spa/critical-path runs). The STT
// runs use MOBUX_STT_URL and never exercise the terminal, so they skip it —
// which also guarantees we never PUT to the default https://localhost:5151
// live server. The `request` fixture inherits the spec's extraHTTPHeaders
// (basic auth) and ignoreHTTPSErrors from playwright.config.cjs.
//
// Selection: each project in playwright.config.cjs sets
// `use.renderer = 'xterm' | 'sterk'`. The fixture reads it via
// `testInfo.project.use.renderer`.
//
// `sterkOnly(test)` is a sibling helper for tests that poke sterk-internal DOM
// (`.ace_*`, `window.__sterk._sterk`, etc.). These can't be made
// renderer-agnostic cheaply and we explicitly want them to keep running
// against the experimental backend.
const base = require;
const PREF_DEFAULTS = ;
exports. = base..;
exports. = base.;
exports.PREF_DEFAULTS = PREF_DEFAULTS;
// Skip the current test unless we're running under the sterk project.
// Call this as the FIRST line inside any test that pokes sterk-internal DOM
// (`.ace_scroller`, `.ace_line`, `window.__sterk`, `getCellMetrics`, etc.).
exports ;