@@ -9,6 +9,7 @@ import ContextMenuForceMountTest from "./context-menu-force-mount-test.svelte";
99import { expectExists , expectNotExists } from "../browser-utils" ;
1010import ContextMenuIntegrationTest from "./context-menu-integration-test.svelte" ;
1111import ContextMenuNestedTest from "./context-menu-nested-test.svelte" ;
12+ import ContextMenuTooltipTest from "./context-menu-tooltip-test.svelte" ;
1213
1314const kbd = getTestKbd ( ) ;
1415
@@ -428,16 +429,6 @@ it("calls `onValueChange` when the value of the checkbox group changes", async (
428429 expect ( onValueChange ) . toHaveBeenCalledWith ( [ "2" ] ) ;
429430} ) ;
430431
431- it ( "should not open when right-clicked while another floating layer is open that is not a context menu" , async ( ) => {
432- render ( ContextMenuIntegrationTest ) ;
433- await page . getByTestId ( "dropdown-trigger" ) . click ( ) ;
434- const dropdownContent = page . getByTestId ( "dropdown-content" ) ;
435- await expectExists ( dropdownContent ) ;
436- await page . getByTestId ( "context-trigger-1" ) . click ( { button : "right" } ) ;
437- await expectNotExists ( page . getByTestId ( "context-content-1" ) ) ;
438- await expectExists ( dropdownContent ) ;
439- } ) ;
440-
441432it ( "should allow switching between context menus via right-click" , async ( ) => {
442433 render ( ContextMenuIntegrationTest ) ;
443434 await page . getByTestId ( "context-trigger-1" ) . click ( { button : "right" } ) ;
@@ -476,3 +467,11 @@ it("should allow overriding the pointer events style", async () => {
476467 await trigger . click ( { button : "right" , force : true } ) ;
477468 await expectNotExists ( page . getByTestId ( "content" ) ) ;
478469} ) ;
470+
471+ it ( "should open when right clicked inside a tooltip trigger" , async ( ) => {
472+ render ( ContextMenuTooltipTest ) ;
473+
474+ await page . getByTestId ( "tooltip-trigger" ) . hover ( ) ;
475+ await page . getByTestId ( "context-menu-trigger" ) . click ( { button : "right" } ) ;
476+ await expectExists ( page . getByTestId ( "context-menu-content" ) ) ;
477+ } ) ;
0 commit comments