Skip to content

Commit

Permalink
Additional stability improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeDr committed Jun 15, 2016
1 parent 739b005 commit 14b7d3a
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 8 deletions.
13 changes: 10 additions & 3 deletions test/support/pages/dashboard_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,24 @@ export default (function () {
// click save button
.then(function () {
return common.try(function () {
common.debug('clicking final Save button for named dashboard');
return thisTime
.findByCssSelector('.btn-primary')
.click();
});
})
.then(function () {
return headerPage.getSpinnerDone();
})
// verify that green message at the top of the page.
// it's only there for about 5 seconds
.then(function () {
return thisTime
.findByCssSelector('kbn-truncated.toast-message.ng-isolate-scope')
.getVisibleText();
return common.try(function () {
common.debug('verify toast-message for saved dashboard');
return thisTime
.findByCssSelector('kbn-truncated.toast-message.ng-isolate-scope')
.getVisibleText();
});
});
},

Expand Down
25 changes: 20 additions & 5 deletions test/support/pages/header_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,12 @@ export default (function () {
},

clickTimepicker: function clickTimepicker() {
var self = this;
return this.remote.setFindTimeout(defaultFindTimeout)
.findDisplayedByClassName('navbar-timepicker-time-desc').click();
.findDisplayedByClassName('navbar-timepicker-time-desc').click()
.then(function () {
return self.getSpinnerDone();
});
},

isTimepickerOpen: function isTimepickerOpen() {
Expand All @@ -56,8 +60,12 @@ export default (function () {
},

clickAbsoluteButton: function clickAbsoluteButton() {
var self = this;
return this.remote.setFindTimeout(defaultFindTimeout)
.findByLinkText('Absolute').click();
.findByLinkText('Absolute').click()
.then(function () {
return self.getSpinnerDone();
});
},

setFromTime: function setFromTime(timeString) {
Expand All @@ -75,9 +83,13 @@ export default (function () {
},

clickGoButton: function clickGoButton() {
var self = this;
return this.remote.setFindTimeout(defaultFindTimeout)
.findByClassName('kbn-timepicker-go')
.click();
.click()
.then(function () {
return self.getSpinnerDone();
});
},


Expand Down Expand Up @@ -106,9 +118,13 @@ export default (function () {
},

collapseTimepicker: function collapseTimepicker() {
var self = this;
return this.remote.setFindTimeout(defaultFindTimeout)
.findByCssSelector('.fa.fa-chevron-circle-up')
.click();
.click()
.then(function () {
return self.getSpinnerDone();
});
},

getToastMessage: function getToastMessage() {
Expand All @@ -119,7 +135,6 @@ export default (function () {

waitForToastMessageGone: function waitForToastMessageGone() {
var self = this;

return self.remote.setFindTimeout(defaultFindTimeout)
.waitForDeletedByCssSelector('kbn-truncated.toast-message');
},
Expand Down

0 comments on commit 14b7d3a

Please sign in to comment.