dmtrKovalenko / cypress-real-events

Fire native system events from Cypress.
MIT License
755 stars 67 forks source link

Option "step" documentation is ambiguous #638

Closed katapofatico closed 2 months ago

katapofatico commented 6 months ago

Hello,

In order to swipe faster, I've been playing with the options parameter. In my case, I'm using length : 110 for left|right and length : 180 for top|bottom. The option step documentation says that it means how often new touch move will be generated. My first thought was: "The fewer steps, the faster swipe" (and I've double-checked the interpretation with an AI assistant), but I've checked that it's just the opposite. If I'm right, please could you clarify the documentation? BTW: it's an opportunity to copy it from the code to the README.

Thanks in advance for your super helpful library.

dmtrKovalenko commented 6 months ago

Fan fact: I also though it should work this way 😅

If you have this off your hand could you post maybe a video of different options swiping?

amoshydra commented 6 months ago

Not sure if this helps, but I happen to create a canvas to test the swipe events.

https://github.com/dmtrKovalenko/cypress-real-events/assets/8733840/55e0c18d-8748-40ce-9ed8-86665a4b4a65

Swiping right over a length of 960px

Step:

reproduce repo: https://github.com/amoshydra/repro-dmtrKovalenko-cypress-real-events-i-swipes/blob/real-swipe-steps-issue-638/src/components/input/Canvas.cy.tsx

dmtrKovalenko commented 2 months ago

@amoshydra thanks this is a pretty clear description of how this intent to be working.