fix(ui): keep mega menu open across hover gap
This commit is contained in:
@@ -3133,6 +3133,15 @@ test("mega menu keeps hover activation and click activation from cancelling each
|
||||
expect(source).toContain("max-height: calc(100dvh - 5.5rem)");
|
||||
});
|
||||
|
||||
test("mega menu gives the pointer time to cross from its trigger into a floating panel", () => {
|
||||
const source = readFileSync(uiComponentPath("MegaMenu"), "utf8");
|
||||
expect(source).toContain("state closeTimer = null");
|
||||
expect(source).toContain("@mouseleave='scheduleHide()'");
|
||||
expect(source).toContain("@mouseenter='cancelScheduledHide()'");
|
||||
expect(source).toContain("}, 220)");
|
||||
expect(source).not.toContain('@mouseleave=\'hidePanel("pointer-leave")\'');
|
||||
});
|
||||
|
||||
test("navbar pins full-width mega panels to desktop viewport gutters", () => {
|
||||
const source = readFileSync(uiComponentPath("Navbar"), "utf8");
|
||||
expect(source).toMatch(/\.wrn-navbar__mega\[data-full-width="true"\] \.wrn-mega__panel \{[^}]*position: fixed/s);
|
||||
|
||||
Reference in New Issue
Block a user