[7.17] Fix flaky drag and drop tests (#221713)

## Summary

Fixes issue with drag and drop page object. This was fixed in #215439
with `sleep` timers to slow down the ftr.

Fix #216123
This commit is contained in:
Nick Partridge 2025-05-28 06:38:59 -07:00 committed by GitHub
parent 8ec307ae80
commit 8154280153
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -328,8 +328,12 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
await el.focus();
await browser.pressKeys(browser.keys.ENTER);
for (let i = 0; i < steps; i++) {
// This needs to be slowed down to avoid flakiness
await PageObjects.common.sleep(200);
await browser.pressKeys(reverse ? browser.keys.LEFT : browser.keys.RIGHT);
}
await PageObjects.common.sleep(200);
await browser.pressKeys(browser.keys.ENTER);
await this.waitForLensDragDropToFinish();
@ -351,8 +355,12 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
await el.focus();
await browser.pressKeys(browser.keys.ENTER);
for (let i = 0; i < steps; i++) {
// This needs to be slowed down to avoid flakiness
await PageObjects.common.sleep(200);
await browser.pressKeys(reverse ? browser.keys.ARROW_UP : browser.keys.ARROW_DOWN);
}
await PageObjects.common.sleep(200);
await browser.pressKeys(browser.keys.ENTER);
await this.waitForLensDragDropToFinish();