mardi 1 août 2017

Trigger drag and drop in Ember using jQuery

I am trying to trigger drag in an Ember e2e test. I have the following code where the mouse events are ignored during the run.

test('drag', async function(assert) {

Ember.run(async function(){
let mv = $.Event('mousemove');
mv.pageX = -230;
mv.pageY = 230;
await $('.tree-node:first').mousedown();
await $('.tree-node:first').trigger(mv);
await $('.tree-node:first').mouseup();

});

How do i trigger a dragging option for elements?




Aucun commentaire:

Enregistrer un commentaire