refactor: simplify hover menu logic and update related tests for workspace switcher
This commit is contained in:
@@ -14,8 +14,11 @@ it("wraps the dropdown label in a Base UI menu group", async () => {
|
||||
assert.match(source, /<DropdownMenuGroup>[\s\S]*<DropdownMenuLabel>\{t\("workspace\.switchWorkspace"\)\}<\/DropdownMenuLabel>/);
|
||||
});
|
||||
|
||||
it("does not auto-open the rail menu from focus events", async () => {
|
||||
it("does not auto-open the rail menu from focus or hover events", async () => {
|
||||
assert.doesNotMatch(source, /onFocus=\{openHoverMenu\}/);
|
||||
assert.doesNotMatch(source, /onBlur=\{closeHoverMenu\}/);
|
||||
assert.doesNotMatch(source, /onPointerEnter=\{openHoverMenu\}/);
|
||||
assert.doesNotMatch(source, /onPointerLeave=\{closeHoverMenu\}/);
|
||||
assert.doesNotMatch(source, /hoverOpen/);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user