Cypress · Senior · Question 65 of 76

How do you test a drag-and-drop UI in Cypress?

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.

Further reading

Problem with a question

Cypress · Senior · question 65

Test yourself

Take the Cypress · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz