[page_objects/visual_builder_page] fixes #29670 with proper wait for visualization loaded (#29741)

This commit is contained in:
Dmitry Lemeshko 2019-02-01 11:11:24 +01:00 committed by GitHub
parent b1b941dd8f
commit 83a2f7b030
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -58,6 +58,7 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }) {
}
async enterMarkdown(markdown) {
const prevRenderingCount = await PageObjects.visualize.getVisualizationRenderingCount();
const input = await find.byCssSelector('.tvbMarkdownEditor__editor textarea');
// Since we use ACE editor and that isn't really storing its value inside
// a textarea we must really select all text and remove it, and cannot use
@ -70,7 +71,7 @@ export function VisualBuilderPageProvider({ getService, getPageObjects }) {
await input.pressKeys(browser.keys.NULL); // Release modifier keys
await input.pressKeys(browser.keys.BACKSPACE); // Delete all content
await input.type(markdown);
await PageObjects.header.waitUntilLoadingHasFinished();
await PageObjects.visualize.waitForRenderingCount(prevRenderingCount + 1);
}
async getMarkdownText() {