From cb75149f0e5c32640928b76e6872bd0c8f468a01 Mon Sep 17 00:00:00 2001 From: dej611 Date: Thu, 24 Sep 2020 17:07:53 +0200 Subject: [PATCH] :bug: Fix flacky test with tab workaround for race condition --- x-pack/test/functional/page_objects/lens_page.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/x-pack/test/functional/page_objects/lens_page.ts b/x-pack/test/functional/page_objects/lens_page.ts index a1e62afbe14c8..a27906fae5fe1 100644 --- a/x-pack/test/functional/page_objects/lens_page.ts +++ b/x-pack/test/functional/page_objects/lens_page.ts @@ -127,7 +127,9 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont await testSubjects.click('lns-newBucket-add'); const queryInput = await testSubjects.find('indexPattern-filters-queryStringInput'); await queryInput.type(queryString); - await PageObjects.common.pressEnterKey(); + // Press Tab 2 twice instead of Enter to avoid race condition with the dropdown + await PageObjects.common.pressTabKey(); + await PageObjects.common.pressTabKey(); await PageObjects.common.pressEnterKey(); await PageObjects.common.sleep(1000); // give time for debounced components to rerender },