[Functional] Fixes cloud failures on TSVB markdown (#77158)

* [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
This commit is contained in:
Stratoula Kalafateli 2020-09-15 17:02:03 +03:00 committed by GitHub
parent 1ab229aea8
commit 98113eeb1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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`);
}
@ -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() {