Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small clean up with visualize test + extra debug log #13755

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
class="kuiLocalDropdownInput"
input-focus="select"
type="text"
data-test-subj="visTitleInput"
name="visTitle"
ng-model="opts.savedVis.title"
required
Expand Down
4 changes: 3 additions & 1 deletion test/functional/page_objects/header_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ export function HeaderPageProvider({ getService, getPageObjects }) {
async getToastMessage(findTimeout = defaultFindTimeout) {
const toastMessage =
await find.displayedByCssSelector('kbn-truncated.toast-message.ng-isolate-scope', findTimeout);
return toastMessage.getVisibleText();
const messageText = await toastMessage.getVisibleText();
log.debug(`getToastMessage: ${messageText}`);
return messageText;
}

async waitForToastMessageGone() {
Expand Down
17 changes: 13 additions & 4 deletions test/functional/page_objects/visualize_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,20 @@ export function VisualizePageProvider({ getService, getPageObjects }) {
await find.clickByCssSelector('input[name="wms.enabled"]');
}

async ensureSavePanelOpen() {
log.debug('ensureSavePanelOpen');
let isOpen = await testSubjects.exists('saveVisualizationButton');
await retry.try(async () => {
while (!isOpen) {
await testSubjects.click('visualizeSaveButton');
isOpen = await testSubjects.exists('saveVisualizationButton');
}
});
}

async saveVisualization(vizName) {
await testSubjects.click('visualizeSaveButton');
log.debug('saveButton button clicked');
const visTitle = await find.byName('visTitle');
await visTitle.type(vizName);
await this.ensureSavePanelOpen();
await testSubjects.setValue('visTitleInput', vizName);
log.debug('click submit button');
await testSubjects.click('saveVisualizationButton');
await PageObjects.header.waitUntilLoadingHasFinished();
Expand Down