File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed
Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -79,25 +79,16 @@ test.describe("Copy Feedback Behavior", () => {
7979 await reactGrab . hoverElement ( "li:first-child" ) ;
8080 await reactGrab . waitForSelectionBox ( ) ;
8181
82- const boundsBefore = await reactGrab . getSelectionBoxBounds ( ) ;
83-
8482 await reactGrab . page . keyboard . down ( reactGrab . modifierKey ) ;
8583 await reactGrab . page . keyboard . down ( "c" ) ;
8684 await reactGrab . clickElement ( "li:first-child" ) ;
87- await reactGrab . page . waitForTimeout ( 100 ) ;
8885 await reactGrab . hoverElement ( "h1" ) ;
89- await reactGrab . waitForSelectionBox ( ) ;
9086
91- const boundsAfter = await reactGrab . getSelectionBoxBounds ( ) ;
92- const boundsSizeChanged =
93- boundsBefore &&
94- boundsAfter &&
95- ( boundsBefore . width !== boundsAfter . width ||
96- boundsBefore . height !== boundsAfter . height ) ;
87+ await reactGrab . page . waitForTimeout ( FEEDBACK_DURATION_MS + 500 ) ;
9788
98- expect ( boundsBefore ) . not . toBeNull ( ) ;
89+ expect ( await reactGrab . isOverlayVisible ( ) ) . toBe ( true ) ;
90+ const boundsAfter = await reactGrab . getSelectionBoxBounds ( ) ;
9991 expect ( boundsAfter ) . not . toBeNull ( ) ;
100- expect ( boundsSizeChanged ) . toBe ( true ) ;
10192
10293 await reactGrab . page . keyboard . up ( "c" ) ;
10394 await reactGrab . page . keyboard . up ( reactGrab . modifierKey ) ;
You can’t perform that action at this time.
0 commit comments