Skip to content

Commit

Permalink
make drag drop test more stable (elastic#88614)
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 authored Jan 21, 2021
1 parent 248ed42 commit 0b798f7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/functional/services/common/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* Public License, v 1.
*/

import { delay } from 'bluebird';
import { cloneDeepWith } from 'lodash';
import { Key, Origin } from 'selenium-webdriver';
// @ts-ignore internal modules are not typed
Expand Down Expand Up @@ -298,11 +299,13 @@ export async function BrowserProvider({ getService }: FtrProviderContext) {
dispatchEvent(target, dropEvent, dragStartEvent.dataTransfer);
const dragEndEvent = createEvent('dragend');
dispatchEvent(origin, dragEndEvent, dropEvent.dataTransfer);
}, 50);
}, 100);
`,
from,
to
);
// wait for 150ms to make sure the script has run
await delay(150);
}

/**
Expand Down

0 comments on commit 0b798f7

Please sign in to comment.