Skip to content

Commit

Permalink
[Functional] Fixes cloud failures on TSVB markdown (#77158)
Browse files Browse the repository at this point in the history
* [TSVB] Remove the char by char typing on markodown

* revert

* Add the markdown to be computed immediately and give some time to compute it

* Add retry to locate TSVB tabs
  • Loading branch information
stratoula authored Sep 15, 2020
1 parent 1ab229a commit 98113ee
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions 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 Expand Up @@ -130,8 +133,8 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }: FtrPro
public async enterMarkdown(markdown: string) {
const input = await find.byCssSelector('.tvbMarkdownEditor__editor textarea');
await this.clearMarkdown();
await input.type(markdown, { charByChar: true });
await PageObjects.visChart.waitForVisualizationRenderingStabilized();
await input.type(markdown);
await PageObjects.common.sleep(3000);
}

public async clearMarkdown() {
Expand Down

0 comments on commit 98113ee

Please sign in to comment.