dmtrKovalenko / cypress-real-events

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

feature request: delay option in realSwipe #620

Closed alirezamirian closed 6 months ago

alirezamirian commented 7 months ago

Some UI components that support drag/swipe by touch, ignore immediate touch move after touch start, not to interfere with page scrolling. Example: https://react-spectrum.adobe.com/react-spectrum/RangeCalendar.html

Right now it's not possible to use realSwipe for testing such components. There is also no support for lower-level commands like touchStart and touchEnd to implement such touch gestures.

Adding an option to specify the delay between touch start and touch moves would help covering such scenarios. I've already tested it and I can open a PR if the option makes sense.

Alternative solutions

  1. Expose lower-level commands, realTouchStart, realTouchMove and realTouchEnd (similar to realMouseDown, realMouseMove, and realMouseUp)
  2. Add a different command, like realDrag, that would have a similar delay option, and an option to specify if the drag is via touch or mouse.
dmtrKovalenko commented 7 months ago

Both options seems to be relevant. PRs are welcome

dmtrKovalenko commented 6 months ago

:tada: This issue has been resolved in version 1.12.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

dmtrKovalenko commented 2 months ago

:tada: This issue has been resolved in version 1.13.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: