@@ -2306,7 +2306,7 @@ describe('useDrag and useDrop', function () {
23062306 expect ( document . getElementById ( draggable . getAttribute ( 'aria-describedby' ) ) ) . toHaveTextContent ( 'Click to start dragging' ) ;
23072307 expect ( draggable ) . toHaveAttribute ( 'data-dragging' , 'false' ) ;
23082308
2309- await user . click ( draggable ) ;
2309+ await user . pointer ( { target : draggable , keys : '[MouseLeft]' , coords : { width : 0 , height : 0 } } ) ;
23102310 act ( ( ) => jest . runAllTimers ( ) ) ;
23112311 expect ( document . activeElement ) . toBe ( draggable ) ;
23122312 expect ( draggable ) . toHaveAttribute ( 'aria-describedby' ) ;
@@ -2425,7 +2425,7 @@ describe('useDrag and useDrop', function () {
24252425 let buttons = tree . getAllByRole ( 'button' ) ;
24262426 expect ( buttons ) . toHaveLength ( 4 ) ;
24272427
2428- await user . click ( draggable ) ;
2428+ await user . pointer ( { target : draggable , keys : '[MouseLeft]' , coords : { width : 0 , height : 0 } } ) ;
24292429 act ( ( ) => jest . runAllTimers ( ) ) ;
24302430
24312431 buttons = tree . getAllByRole ( 'button' ) ;
@@ -2469,7 +2469,7 @@ describe('useDrag and useDrop', function () {
24692469 act ( ( ) => draggable . focus ( ) ) ;
24702470 fireEvent ( draggable , pointerEvent ( 'pointerdown' , { pointerId : 1 , width : 1 , height : 1 , pressure : 0 , detail : 0 } ) ) ;
24712471 fireEvent ( draggable , pointerEvent ( 'pointerup' , { pointerId : 1 , width : 1 , height : 1 , pressure : 0 , detail : 0 } ) ) ;
2472- await user . click ( draggable ) ;
2472+ await user . pointer ( { target : draggable , keys : '[MouseLeft]' , coords : { width : 0 , height : 0 } } ) ;
24732473 act ( ( ) => jest . runAllTimers ( ) ) ;
24742474 expect ( draggable ) . toHaveAttribute ( 'data-dragging' , 'true' ) ;
24752475 expect ( draggable ) . toHaveAttribute ( 'aria-describedby' ) ;
@@ -2499,7 +2499,7 @@ describe('useDrag and useDrop', function () {
24992499 act ( ( ) => draggable . focus ( ) ) ;
25002500 fireEvent ( draggable , pointerEvent ( 'pointerdown' , { pointerId : 1 , width : 1 , height : 1 , pressure : 0 , detail : 0 } ) ) ;
25012501 fireEvent ( draggable , pointerEvent ( 'pointerup' , { pointerId : 1 , width : 1 , height : 1 , pressure : 0 , detail : 0 } ) ) ;
2502- await user . click ( draggable ) ;
2502+ await user . pointer ( { target : draggable , keys : '[MouseLeft]' , coords : { width : 0 , height : 0 } } ) ;
25032503 act ( ( ) => jest . runAllTimers ( ) ) ;
25042504 expect ( draggable ) . toHaveAttribute ( 'data-dragging' , 'true' ) ;
25052505
@@ -2536,7 +2536,7 @@ describe('useDrag and useDrop', function () {
25362536 let draggable = tree . getByText ( 'Drag me' ) ;
25372537
25382538 act ( ( ) => draggable . focus ( ) ) ;
2539- await user . click ( draggable ) ;
2539+ await user . pointer ( { target : draggable , keys : '[MouseLeft]' , coords : { width : 0 , height : 0 } } ) ;
25402540 act ( ( ) => jest . runAllTimers ( ) ) ;
25412541
25422542 expect ( tree . getAllByRole ( 'button' ) ) . toHaveLength ( 2 ) ;
@@ -2597,7 +2597,7 @@ describe('useDrag and useDrop', function () {
25972597 let draggable = tree . getByText ( 'Drag me' ) ;
25982598
25992599 act ( ( ) => draggable . focus ( ) ) ;
2600- await user . click ( draggable ) ;
2600+ await user . pointer ( { target : draggable , keys : '[MouseLeft]' , coords : { width : 0 , height : 0 } } ) ;
26012601 act ( ( ) => jest . runAllTimers ( ) ) ;
26022602
26032603 expect ( tree . getAllByRole ( 'button' ) ) . toHaveLength ( 3 ) ;
@@ -2622,7 +2622,7 @@ describe('useDrag and useDrop', function () {
26222622 let draggable = tree . getByText ( 'Drag me' ) ;
26232623
26242624 act ( ( ) => draggable . focus ( ) ) ;
2625- await user . click ( draggable ) ;
2625+ await user . pointer ( { target : draggable , keys : '[MouseLeft]' , coords : { width : 0 , height : 0 } } ) ;
26262626 act ( ( ) => jest . runAllTimers ( ) ) ;
26272627
26282628 expect ( tree . getAllByRole ( 'button' ) ) . toHaveLength ( 3 ) ;
@@ -2645,7 +2645,7 @@ describe('useDrag and useDrop', function () {
26452645 let input = tree . getByRole ( 'textbox' ) ;
26462646
26472647 act ( ( ) => draggable . focus ( ) ) ;
2648- await user . click ( draggable ) ;
2648+ await user . pointer ( { target : draggable , keys : '[MouseLeft]' , coords : { width : 0 , height : 0 } } ) ;
26492649 act ( ( ) => jest . runAllTimers ( ) ) ;
26502650
26512651 act ( ( ) => droppable . focus ( ) ) ;
@@ -2665,7 +2665,7 @@ describe('useDrag and useDrop', function () {
26652665 let input = tree . getByRole ( 'textbox' ) ;
26662666
26672667 act ( ( ) => draggable . focus ( ) ) ;
2668- await user . click ( draggable ) ;
2668+ await user . pointer ( { target : draggable , keys : '[MouseLeft]' , coords : { width : 0 , height : 0 } } ) ;
26692669 act ( ( ) => jest . runAllTimers ( ) ) ;
26702670
26712671 act ( ( ) => input . focus ( ) ) ;
@@ -2682,7 +2682,7 @@ describe('useDrag and useDrop', function () {
26822682 let droppable = tree . getByText ( 'Drop here' ) ;
26832683
26842684 act ( ( ) => draggable . focus ( ) ) ;
2685- await user . click ( draggable ) ;
2685+ await user . pointer ( { target : draggable , keys : '[MouseLeft]' , coords : { width : 0 , height : 0 } } ) ;
26862686 act ( ( ) => jest . runAllTimers ( ) ) ;
26872687
26882688 act ( ( ) => droppable . focus ( ) ) ;
@@ -2700,7 +2700,7 @@ describe('useDrag and useDrop', function () {
27002700 let draggable = tree . getByText ( 'Drag me' ) ;
27012701
27022702 act ( ( ) => draggable . focus ( ) ) ;
2703- await user . click ( draggable ) ;
2703+ await user . pointer ( { target : draggable , keys : '[MouseLeft]' , coords : { width : 0 , height : 0 } } ) ;
27042704 act ( ( ) => jest . runAllTimers ( ) ) ;
27052705
27062706 act ( ( ) => draggable . blur ( ) ) ;
@@ -2732,7 +2732,7 @@ describe('useDrag and useDrop', function () {
27322732 let droppable = tree . getByText ( 'Drop here' ) ;
27332733
27342734 act ( ( ) => draggable . focus ( ) ) ;
2735- await user . click ( draggable ) ;
2735+ await user . pointer ( { target : draggable , keys : '[MouseLeft]' , coords : { width : 0 , height : 0 } } ) ;
27362736 act ( ( ) => jest . runAllTimers ( ) ) ;
27372737 expect ( draggable ) . toHaveAttribute ( 'data-dragging' , 'true' ) ;
27382738
@@ -2757,7 +2757,7 @@ describe('useDrag and useDrop', function () {
27572757 expect ( draggable ) . toHaveAttribute ( 'aria-describedby' ) ;
27582758 expect ( document . getElementById ( draggable . getAttribute ( 'aria-describedby' ) ) ) . toHaveTextContent ( 'Double tap to start dragging' ) ;
27592759
2760- await user . click ( draggable ) ;
2760+ await user . pointer ( { target : draggable , keys : '[MouseLeft]' , coords : { width : 0 , height : 0 } } ) ;
27612761 act ( ( ) => jest . runAllTimers ( ) ) ;
27622762 expect ( document . activeElement ) . toBe ( draggable ) ;
27632763 expect ( draggable ) . toHaveAttribute ( 'aria-describedby' ) ;
0 commit comments