Skip to content

Commit

Permalink
Add retry to locate TSVB tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
stratoula committed Sep 15, 2020
1 parent a63d497 commit dbab912
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test/functional/page_objects/visual_builder_page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }: FtrPro
}

public async checkTabIsLoaded(testSubj: string, name: string) {
const isPresent = await testSubjects.exists(testSubj, { timeout: 10000 });
let isPresent = false;
await retry.try(async () => {
isPresent = await testSubjects.exists(testSubj, { timeout: 20000 });
});
if (!isPresent) {
throw new Error(`TSVB ${name} tab is not loaded`);
}
Expand Down

0 comments on commit dbab912

Please sign in to comment.