test: settle zoom baseline after editor collapse

This commit is contained in:
Matysh
2026-08-07 22:18:03 +03:00
parent 953063b984
commit 4e29db1afb
+5
View File
@@ -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 };