Trying to drag and drop with Cypress
See original GitHub issueHi !
I would like to test my application with Cypress but I can’t find a way to simulate a drag and drop. I tried to use the same mouseMoveBy
command you created in draggable_spec.ts
, but it has no effect on my application. Nothing seems to move.
I just have a basic drag and drop setup from the DndKit getting started documentation, nothing fancy. Did you have to setup something special to make it work with Cypress?
I’m not sure if I can use Cypress with Code Sandbox so I can link a reproductive example. I’ll investigate.
Thank you
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top Results From Across the Web
How to Implement Drag and Drop in Cypress - Testup.io
Method 2: Using “DragStart” to move elements ... Alternatively, we can perform drag-and-drop tests in Cypress using the DragStart method. This method does...
Read more >Cypress code-snippet#1- Drag and Drop feature
Approach 1: Using events such as dragstart, drop and dragend we can successfully achieve drag and drop. Create a new DataTransfer object, which...
Read more >How to implement drag and drop in cypress test?
get(dragSelector).should('exist') in function drag won't guard against async loading, Commands just tell Cypress "put this test in the ...
Read more >Drag and Drop in Cypress - Automated Visual Testing
Learn how to simulate drag and drop actions in Cypress. ... Drag and drop is a common tool that gives developers the ability...
Read more >A cypress child command for drag'n'drop support. - GitHub
The drag command is a child command. The command only accepts elements. As the drop target simply pass a selector as a string....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
hi, @damien-monni
I had similar issue and found a solution. in your dnd-kit-issue repository, try this:
It seems like MouseSensor is necessary. I hope this helps.
https://github.com/clauderic/dnd-kit/pull/437