From 7d58a483898891db0195843c6a753f08a1625085 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Tue, 27 Jan 2026 03:13:27 +0000 Subject: [PATCH] fix(test): wait for sidebar transition in visual test Adds an explicit timeout to `tests/visual/overlay-layers.spec.ts` to allow the CSS sidebar transition to complete before asserting layout metrics. This fixes a race condition where the margin measurement was performed while the transition was still in progress. Fixes failure: expect(received).toBeLessThan(expected) Expected: < 0.5 Co-authored-by: PR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> --- tests/visual/overlay-layers.spec.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/visual/overlay-layers.spec.ts b/tests/visual/overlay-layers.spec.ts index 8a4aff43..3df4735c 100644 --- a/tests/visual/overlay-layers.spec.ts +++ b/tests/visual/overlay-layers.spec.ts @@ -129,6 +129,9 @@ test.describe("overlay layering tokens", () => { document.getElementById("sidebar")?.classList.contains("sidebar-expanded") ); + // Wait for sidebar transition to complete + await page.waitForTimeout(500); + const expandedLayout = await page.evaluate(() => { const sidebar = document.getElementById("sidebar"); const app = document.getElementById("app");