Skip to content

Commit

Permalink
🐛 Fix flacky test with tab workaround for race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
dej611 committed Sep 24, 2020
1 parent 839817c commit cb75149
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion x-pack/test/functional/page_objects/lens_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down

0 comments on commit cb75149

Please sign in to comment.