@@ -26,8 +26,13 @@ export class NavigationMenuPage {
2626 const dragHandle = cy . get ( `#dragHandle0_${ templateIndex } ` ) ;
2727 const target = cy . get ( 'mat-card > mat-accordion' ) . first ( ) ;
2828
29- dragHandle . trigger ( 'mousedown' , { which : 1 } ) ;
30- target . trigger ( 'mousemove' , 'top' ) . trigger ( 'mouseup' , { force : true } ) ;
29+ dragHandle
30+ . trigger ( 'mousedown' , { button : 0 , bubbles : true } )
31+ . trigger ( 'mousemove' , { pageX : 10 , pageY : 0 } ) ;
32+
33+ target
34+ . trigger ( 'mousemove' , { position : 'top' } )
35+ . trigger ( 'mouseup' , { button : 0 , bubbles : true } ) ;
3136 }
3237
3338 public createCustomLink ( data : { securityGroups ?: string [ ] ; link : string ; translations : string [ ] } ) {
@@ -183,8 +188,13 @@ export class NavigationMenuPage {
183188 const dragHandle = cy . get ( `#dragHandle0_${ templateIndex } ` ) ;
184189 const dropdownBody = cy . get ( '#menuItems' ) . eq ( dropdownIndex ) . find ( '#dropdownBody' ) ;
185190
186- dragHandle . trigger ( 'mousedown' , { which : 1 } ) ;
187- dropdownBody . trigger ( 'mousemove' ) . trigger ( 'mouseup' , { force : true } ) ;
191+ dragHandle
192+ . trigger ( 'mousedown' , { button : 0 , bubbles : true } )
193+ . trigger ( 'mousemove' , { pageX : 10 , pageY : 0 } ) ;
194+
195+ dropdownBody
196+ . trigger ( 'mousemove' , { position : 'center' } )
197+ . trigger ( 'mouseup' , { button : 0 , bubbles : true } ) ;
188198
189199 cy . wait ( 500 ) ;
190200 this . collapseTemplates ( 0 ) ;
@@ -218,9 +228,14 @@ export class NavigationMenuPage {
218228 fromHandle . scrollIntoView ( ) ;
219229 cy . wait ( 2000 ) ;
220230
221- fromHandle . trigger ( 'mousedown' , { which : 1 , force : true } ) ;
222- toHandle . trigger ( 'mousemove' , { force : true } ) ;
223- toHandle . trigger ( 'mouseup' , { force : true } ) ;
231+ fromHandle
232+ . trigger ( 'mousedown' , { button : 0 , bubbles : true } )
233+ . trigger ( 'mousemove' , { pageX : 10 , pageY : 0 } ) ;
234+
235+ toHandle
236+ . trigger ( 'mousemove' , { position : 'center' } )
237+ . trigger ( 'mouseup' , { button : 0 , bubbles : true } ) ;
238+
224239 cy . wait ( 2000 ) ;
225240 }
226241
0 commit comments