From ce0d583d9a1aa63c39870c8056b0ad7a4ba93b3e Mon Sep 17 00:00:00 2001 From: Joe Reuter Date: Thu, 21 Jan 2021 14:29:23 +0100 Subject: [PATCH] make drag drop test more stable (#88614) --- test/functional/services/common/browser.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/functional/services/common/browser.ts b/test/functional/services/common/browser.ts index ae66e7af568c3..0eb36495dab67 100644 --- a/test/functional/services/common/browser.ts +++ b/test/functional/services/common/browser.ts @@ -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); } /**