mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-03 19:35:28 +00:00
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:
1 parent
8e223650c6
commit
ae03023d72
1 file changed
+5
@@ -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");
|
||||
|
||||
Reference in new issue
Block a user