From 4e29db1afb1d6904a3d925e2575c2f5ebf21f0b9 Mon Sep 17 00:00:00 2001 From: Matysh Date: Fri, 7 Aug 2026 22:18:03 +0300 Subject: [PATCH] test: settle zoom baseline after editor collapse --- demo/smoke_zoom_out.mjs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/demo/smoke_zoom_out.mjs b/demo/smoke_zoom_out.mjs index 2d25aa48..dab150f3 100644 --- a/demo/smoke_zoom_out.mjs +++ b/demo/smoke_zoom_out.mjs @@ -86,6 +86,11 @@ out.untouchedEditorNoJump = await page.evaluate(async () => { const c = window.__card; const raf2 = () => new Promise((r) => requestAnimationFrame(() => requestAnimationFrame(r))); c._setMode('view'); + // The previous case has only waited two frames after leaving an editor. + // Let its 180 ms chrome collapse and ResizeObservers settle before taking a + // new baseline; otherwise this case measures the previous transition, not + // the untouched editor round-trip it is meant to verify. + await new Promise((resolve) => setTimeout(resolve, 240)); c._resetZoom(); c._zoomAt(30, 30, 1.6); c._saveZoom(); const before = { ...c._view };