refactor(examples): update types of some examples

This commit is contained in:
moklick
2022-04-25 11:08:24 +02:00
parent e4eb9d0b38
commit 90aca9d4e6
6 changed files with 37 additions and 19 deletions
+4 -4
View File
@@ -24,10 +24,10 @@
// -- 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 })
return cy
.get(selector)
.trigger('mousedown', { which: 1, force: true })
.trigger('mousemove', { clientX: x, clientY: y, force: true })
.trigger('mouseup', { force: true });
});