Cypress · Senior · Question 65 of 76
How do you test a drag-and-drop UI in Cypress?
- 1Cypress can't simulate any mouse events
- 2Trigger mouse or drag events, or use a plugin
- 3Only manual testing works for drag and drop at all
Show the answer
Correct answer: Trigger mouse or drag events, or use a plugin
Explanation
.trigger('mousedown'), mousemove, mouseup or a drag plugin, depending on how the library listens for events.