1

Has anyone successfully used cypress and got drag and drop with the angular-tree-component working?

https://github.com/500tech/angular-tree-component

The angular-tree-component has the ability to drag&drop inside the tree to order the items in the tree or to drag&drop items of the tree somewhere outside of the tree. But either way I can not get it working with cypress. I am using drag&drop with cypress successfully at another part of the application.

It seems like the drag never starts. So after the mousedown event the mousemove event does not drag anything... it is not moving the element.

Gerros
  • 688
  • 11
  • 20
  • Hey, Cypress doesn't do drag and drop very well. I talked to 500tech and they use TestCafe. I work at a company that does an automation product (Testim.io ) but it's not a free product like TestCafe so maybe check that (or selenium) out. Drag and drop can either be HTML5 based on down-move-up – Benjamin Gruenbaum Apr 25 '19 at 18:12
  • Tried it with mousedown, mousemove, and mouseup events but also with drag events. It is really annoying, because it works with other implementations, but only the angular-tree-component will not work. – Gerros Apr 26 '19 at 08:02
  • I try with native events like mousedown, mousemove, mouseup or startdrag and dragenter, drop but it's not working. Else I trry with the Cypress Drag and drop plugin and it is working but not exactly like expected. Typically I didn't succeed to move a tree node before the first one – jmcollin92 Dec 27 '19 at 18:42
  • cypress drag and drop plugin is here: https://github.com/4teamwork/cypress-drag-drop – jmcollin92 Dec 27 '19 at 18:46

1 Answers1

0

A solution that is working for me is here How to implement drag and drop in cypress test?

(see @bkucera answer).

I hope this helps

jmcollin92
  • 2,896
  • 6
  • 27
  • 49