make drag drop test more stable (#88614) (#88963)

This commit is contained in:
Joe Reuter 2021-01-21 16:21:26 +01:00 committed by GitHub
parent 503a954435
commit 7294d9cb6c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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
@ -296,11 +297,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);
}
/**