fix(desktop): pin E2E sandboxes to Chromium zoom 0

Fresh installs now default to ~91%, but Playwright hit-testing and
visual baselines still assume 100%. Seed zoom-state.json so isolated
E2E profiles don't inherit the product default.
This commit is contained in:
Brooklyn Nicholson 2026-07-28 03:33:10 -05:00
parent 5b32f9dc36
commit 9ad400580c

View file

@ -120,6 +120,17 @@ export function createSandbox(prefix: string): Sandbox {
'utf8',
)
// Pin Chromium actual-size zoom (level 0) for the suite. Fresh installs
// ship DEFAULT_ZOOM_LEVEL ≈ -0.5 (~91%), but Playwright click hit-testing
// and the committed visual baselines were calibrated at 100%. Without this
// file every sandbox would inherit the product default and fail pointer
// interception + snapshot diffs.
fs.writeFileSync(
path.join(userDataDir, 'zoom-state.json'),
JSON.stringify({ zoomLevel: 0 }, null, 2),
'utf8',
)
return {
root,
hermesHome,