getSpinnerDone in dashboard

This commit is contained in:
LeeDr 2016-06-15 11:19:59 -05:00
parent 057ec2db81
commit d4914a3cff
2 changed files with 9 additions and 3 deletions

View file

@ -65,8 +65,8 @@ bdd.describe('dashboard tab', function describeIndexTests() {
// .then(function () {
common.debug('Set absolute time range from \"' + fromTime + '\" to \"' + toTime + '\"');
return headerPage.setAbsoluteRange(fromTime, toTime)
.then(function sleep() {
return common.sleep(4000);
.then(function () {
return headerPage.getSpinnerDone();
})
.then(function takeScreenshot() {
common.debug('Take screenshot');

View file

@ -1,4 +1,4 @@
import { remote, common, defaultFindTimeout } from '../';
import { remote, common, defaultFindTimeout, headerPage } from '../';
export default (function () {
var thisTime;
@ -74,6 +74,9 @@ export default (function () {
return thisTime
.findByCssSelector('button.ng-scope[aria-label="Save Dashboard"]')
.click()
.then(function () {
return headerPage.getSpinnerDone();
})
.then(function () {
return common.sleep(1000);
})
@ -83,6 +86,9 @@ export default (function () {
.findById('dashboardTitle')
.type(dashName);
})
.then(function () {
return headerPage.getSpinnerDone();
})
// click save button
.then(function () {
return common.try(function () {