feat(tests): add drag test
This commit is contained in:
@@ -23,3 +23,11 @@
|
||||
//
|
||||
// -- This is will overwrite an existing command --
|
||||
// Cypress.Commands.overwrite("visit", (originalFn, url, options) => { ... })
|
||||
|
||||
|
||||
Cypress.Commands.add('drag', (selector, { x, y }) => {
|
||||
return cy.get(selector)
|
||||
.trigger('mousedown', { which: 1 })
|
||||
.trigger('mousemove', { clientX: x, clientY: y })
|
||||
.trigger('mouseup', { force: true });
|
||||
});
|
||||
Reference in New Issue
Block a user