Skip to content

Commit

Permalink
Investigate flaky add new visualization link test (#13755) (#13776)
Browse files Browse the repository at this point in the history
  • Loading branch information
stacey-gammon authored Aug 31, 2017
1 parent 99acc17 commit 41b6f06
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
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 @@ -307,11 +307,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

0 comments on commit 41b6f06

Please sign in to comment.