Skip to content

Commit

Permalink
switch from sleeps to waiting for visualize-legend.
Browse files Browse the repository at this point in the history
Fixes #5932
  • Loading branch information
LeeDr committed Jan 19, 2016
1 parent c9f9ad5 commit c25bc1f
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 17 deletions.
4 changes: 2 additions & 2 deletions test/functional/apps/visualize/_area_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ define(function (require) {
common.debug('Waiting...');
return headerPage.getSpinnerDone();
})
.then(function sleep() {
return common.sleep(4000);
.then(function waitForVisualization() {
return visualizePage.waitForVisualization();
})
.then(function takeScreenshot() {
common.debug('Take screenshot');
Expand Down
4 changes: 2 additions & 2 deletions test/functional/apps/visualize/_data_table.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ define(function (require) {
.then(function () {
return visualizePage.loadSavedVisualization(vizName1);
})
.then(function sleep() {
return common.sleep(4000);
.then(function waitForVisualization() {
return visualizePage.waitForVisualization();
})
.then(function takeScreenshot() {
common.debug('Take screenshot');
Expand Down
4 changes: 2 additions & 2 deletions test/functional/apps/visualize/_line_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ define(function (require) {
.then(function () {
return visualizePage.loadSavedVisualization(vizName1);
})
.then(function sleep() {
return common.sleep(4000);
.then(function waitForVisualization() {
return visualizePage.waitForVisualization();
})
.then(function takeScreenshot() {
// take a snapshot just as an example.
Expand Down
4 changes: 2 additions & 2 deletions test/functional/apps/visualize/_pie_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ define(function (require) {
.then(function () {
return visualizePage.loadSavedVisualization(vizName1);
})
.then(function sleep() {
return common.sleep(4000);
.then(function waitForVisualization() {
return visualizePage.waitForVisualization();
})
.then(function takeScreenshot() {
common.debug('Take screenshot');
Expand Down
4 changes: 2 additions & 2 deletions test/functional/apps/visualize/_tile_map.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ define(function (require) {
.then(function () {
return visualizePage.loadSavedVisualization(vizName1);
})
.then(function sleep() {
return common.sleep(4000);
.then(function waitForVisualization() {
return visualizePage.waitForVisualization();
})
.then(function takeScreenshot() {
common.debug('Take screenshot');
Expand Down
8 changes: 4 additions & 4 deletions test/functional/apps/visualize/_vertical_bar_chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ define(function (require) {
.then(function () {
return headerPage.getSpinnerDone(); // only matches the hidden spinner
})
.then(function sleep() {
return common.sleep(1000);
.then(function waitForVisualization() {
return visualizePage.waitForVisualization();
});
});

Expand Down Expand Up @@ -109,8 +109,8 @@ define(function (require) {
.then(function () {
return headerPage.getSpinnerDone(); // only matches the hidden spinner
})
.then(function sleep() {
return common.sleep(4000);
.then(function waitForVisualization() {
return visualizePage.waitForVisualization();
})
.then(function takeScreenshot() {
common.debug('Take screenshot');
Expand Down
6 changes: 3 additions & 3 deletions test/intern.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ define(function (require) {
}],
tunnelOptions: serverConfig.servers.webdriver,
functionalSuites: [
'test/functional/status_page/index',
'test/functional/apps/settings/index',
'test/functional/apps/discover/index',
// 'test/functional/status_page/index',
// 'test/functional/apps/settings/index',
// 'test/functional/apps/discover/index',
'test/functional/apps/visualize/index'
],
excludeInstrumentation: /(fixtures|node_modules)\//,
Expand Down
6 changes: 6 additions & 0 deletions test/support/pages/VisualizePage.js
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,12 @@ define(function (require) {
});
},

waitForVisualization: function waitForVisualization() {
return this.remote
.setFindTimeout(defaultTimeout)
.findByCssSelector('visualize-legend');
}

};

return VisualizePage;
Expand Down

0 comments on commit c25bc1f

Please sign in to comment.