File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 55 ScrollBehaviorOptions ,
66} from "../getCypressElementCoordinates" ;
77import { getModifiers } from "../getModifiers" ;
8+ import { mouseButtonNumbers } from "../mouseButtonNumbers" ;
89
910export interface RealMouseMoveOptions {
1011 /**
@@ -26,6 +27,12 @@ export interface RealMouseMoveOptions {
2627 altKey ?: boolean ;
2728 ctrlKey ?: boolean ;
2829 metaKey ?: boolean ;
30+ /**
31+ * Keeps a mouse button down while moving the mouse
32+ * @default 'none'
33+ * @example cy.realMouseMove(x, y, { keepMouseDownButton: 'left' })
34+ */
35+ keepMouseDownButton ?: keyof typeof mouseButtonNumbers ;
2936}
3037
3138/** @ignore this, update documentation for this function at index.d.ts */
@@ -58,6 +65,7 @@ export async function realMouseMove(
5865 x : x * basePosition . frameScale + basePosition . x ,
5966 y : y * basePosition . frameScale + basePosition . y ,
6067 modifiers : modifiers ,
68+ button : options . keepMouseDownButton ,
6169 } ) ;
6270
6371 log . snapshot ( "after" ) . end ( ) ;
You can’t perform that action at this time.
0 commit comments