fix(test): wait for sidebar fade-in to complete in overlay-layers test

Explicitly wait for the `#sidebar` element to lose the `fade-in` class after dismissing the disclaimer modal in `tests/visual/overlay-layers.spec.ts`. This prevents race conditions in CI environments where the `opacity: 0` style from the fade-in animation persists during subsequent visibility checks, causing `expect(locator).toBeVisible()` to fail unexpectedly.

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-01-28 16:10:40 +00:00
1 parent 8e223650c6
commit ae03023d72
1 file changed
+5
+5
View File
@@ -45,6 +45,11 @@ test.describe("overlay layering tokens", () => {
await dismissDisclaimerModal(page);
// Wait for initial fade-in to complete so opacity doesn't interfere with visibility checks
await page.waitForFunction(
() => !document.getElementById("sidebar")?.classList.contains("fade-in")
);
await expect(page.locator("#mobileMenuBtn")).toHaveCount(0);
const collapseToggle = page.locator("#sidebarCollapseToggle");