@@ -40,7 +40,8 @@ test.describe('Mouse Behavior', () => {
40
40
await expect ( d . getPopover ( ) ) . toBeHidden ( ) ;
41
41
await d . getTrigger ( ) . click ( ) ;
42
42
43
- await expect ( d . getPopover ( ) ) . toBeVisible ( ) ;
43
+ // If I use `toBeVisible` here, the test fails that the `toBeHidden` check below????
44
+ await expect ( d . getPopover ( ) ) . toHaveCSS ( 'opacity' , '1' ) ;
44
45
45
46
const outsideDiv = page . locator ( '#content-outside-of-popover' ) ;
46
47
await outsideDiv . click ( ) ;
@@ -102,9 +103,11 @@ test.describe('Mouse Behavior', () => {
102
103
await expect ( firstPopOver ) . toBeVisible ( ) ;
103
104
await expect ( secondPopOver ) . toBeVisible ( ) ;
104
105
105
- // Act
106
- await firstPopoverTrigger . click ( ) ;
107
- await secondPopoverTrigger . click ( ) ;
106
+ // Need to be explicit about where we're clicking. By default
107
+ // the click action tries to click the center of the element
108
+ // but in this case, the popover is covering it.
109
+ await firstPopoverTrigger . click ( { position : { x : 1 , y : 1 } } ) ;
110
+ await secondPopoverTrigger . click ( { position : { x : 1 , y : 1 } } ) ;
108
111
109
112
// Assert
110
113
await expect ( firstPopOver ) . toBeHidden ( ) ;
@@ -191,7 +194,7 @@ test.describe('Keyboard Behavior', () => {
191
194
} ) ;
192
195
193
196
test ( `GIVEN a pair of manual opened popovers
194
- WHEN clicking the first trigger on the page and then clicking the second trigger
197
+ WHEN activating the first trigger on the page and then activating the second trigger
195
198
THEN then both popovers should be closed` , async ( { page } ) => {
196
199
const { driver : d } = await setup ( page , 'manual' ) ;
197
200
0 commit comments