Skip to content

Commit

Permalink
Add getSpinnerDone on clickNewSearch to fix failures
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeDr committed Jun 20, 2016
1 parent 929f30c commit dfacedb
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions test/support/pages/visualize_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ define(function (require) {
var config = require('intern').config;
var registerSuite = require('intern!object');
var Common = require('./common');
var HeaderPage = require('./header_page');

var defaultTimeout = config.timeouts.default;
var common;
var headerPage;

function VisualizePage(remote) {
this.remote = remote;
common = new Common(this.remote);
headerPage = new HeaderPage(this.remote);
}

VisualizePage.prototype = {
Expand Down Expand Up @@ -122,7 +125,10 @@ define(function (require) {
return this.remote
.setFindTimeout(defaultTimeout * 2)
.findByClassName('kbn-timepicker-go')
.click();
.click()
.then(function () {
return headerPage.getSpinnerDone();
});
},

collapseChart: function collapseChart() {
Expand Down Expand Up @@ -151,7 +157,10 @@ define(function (require) {
return this.remote
.setFindTimeout(defaultTimeout)
.findByCssSelector('li[ng-click="stepTwoMode=\'new\'"]')
.click();
.click()
.then(function () {
return headerPage.getSpinnerDone();
});
},

setValue: function setValue(newValue) {
Expand All @@ -178,7 +187,10 @@ define(function (require) {
return this.remote
.setFindTimeout(defaultTimeout)
.findByCssSelector('li[ng-click="stepTwoMode=\'saved\'"]')
.click();
.click()
.then(function () {
return headerPage.getSpinnerDone();
});
},

selectSearch: function selectSearch(searchName) {
Expand Down Expand Up @@ -282,7 +294,10 @@ define(function (require) {
return this.remote
.setFindTimeout(defaultTimeout)
.findByCssSelector('.btn-success')
.click();
.click()
.then(function () {
return headerPage.getSpinnerDone();
});
},


Expand Down

0 comments on commit dfacedb

Please sign in to comment.