Skip to content

Commit

Permalink
Wrapped part of saveVisualization in a try loop.
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeDr committed May 20, 2016
1 parent a49d765 commit b7334ed
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions test/support/pages/visualize_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export default (function () {

selectField: function selectField(fieldValue) {
var self = this;
return common.try(function () {
return common.try(function tryThis() {
return self.remote
.setFindTimeout(defaultFindTimeout)
// the css below should be more selective
Expand Down Expand Up @@ -316,10 +316,12 @@ export default (function () {
// verify that green message at the top of the page.
// it's only there for about 5 seconds
.then(function () {
return self.remote
.setFindTimeout(defaultFindTimeout)
.findByCssSelector('kbn-truncated.toast-message.ng-isolate-scope')
.getVisibleText();
return common.try(function tryThis() {
return self.remote
.setFindTimeout(defaultFindTimeout)
.findByCssSelector('kbn-truncated.toast-message.ng-isolate-scope')
.getVisibleText();
});
});
},

Expand All @@ -344,7 +346,7 @@ export default (function () {
var self = this;
common.debug('clickVisualizationByLinkText(' + vizName + ')');

return common.try(function () {
return common.try(function tryThis() {
return self.remote
.setFindTimeout(defaultFindTimeout)
.findByLinkText(vizName)
Expand Down Expand Up @@ -662,7 +664,7 @@ export default (function () {

waitForToastMessageGone: function waitForToastMessageGone() {
var self = this;
return common.tryForTime(defaultFindTimeout * 5, function tryingForTime() {
return common.try(function tryThis() {
return self.remote
.setFindTimeout(100)
.findAllByCssSelector('kbn-truncated.toast-message.ng-isolate-scope')
Expand Down

0 comments on commit b7334ed

Please sign in to comment.