We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TouchStart and TouchEvent should start at coordinate x: 0 and y: 0 when x: 0 and y: 0 is provided in readSwipe
x: 0
y: 0
readSwipe
cy.mount(<Canvas />); cy .get("body") .realSwipe("toRight", { x: 0, y: 0, }) ;
However when a 0 value is provided to either x or y, position is computed to be undefined as the values are falsey and intepreted as not provided.
x
y
undefined
cypress-real-events/src/commands/realSwipe.ts
Lines 101 to 104 in 8b8a509
Reproduce repository: https://github.com/amoshydra/repro-dmtrKovalenko-cypress-real-events-i-swipes/blob/real-swipe-with-x-or-y-be-0/src/components/input/Canvas.cy.tsx
The video preview shows 3 tests with the following calls:
.realSwipe("toRight", { x: 0, y: 1, })
.realSwipe("toRight", { x: 1, y: 0, })
.realSwipe("toRight", { x: 1, y: 1, })
0
options.touchPosition
Proposal : #642
The text was updated successfully, but these errors were encountered:
🎉 This issue has been resolved in version 1.13.0 🎉
The release is available on:
Your semantic-release bot 📦🚀
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Expected
TouchStart and TouchEvent should start at coordinate
x: 0
andy: 0
whenx: 0
andy: 0
is provided inreadSwipe
Current
However when a 0 value is provided to either
x
ory
, position is computed to beundefined
as the values are falsey and intepreted as not provided.cypress-real-events/src/commands/realSwipe.ts
Lines 101 to 104 in 8b8a509
Reproduce:
Reproduce repository: https://github.com/amoshydra/repro-dmtrKovalenko-cypress-real-events-i-swipes/blob/real-swipe-with-x-or-y-be-0/src/components/input/Canvas.cy.tsx
The video preview shows 3 tests with the following calls:
repro.mp4
Possible solution
x
andy
areundefined
or0
.x
ory
is provided, automatically fill the undefinedx
ory
as 0.options.touchPosition
should be used only when bothx
andy
are undefined.Proposal : #642
The text was updated successfully, but these errors were encountered: