Limit length of currentUrl when navigating. Too long indicates it didn't change from TileMap to New Vis

This commit is contained in:
LeeDr 2016-06-16 09:02:53 -05:00
parent 475220a129
commit 65f74e08b9
2 changed files with 41 additions and 5 deletions

View file

@ -116,7 +116,7 @@ export default (function () {
})
.then(function (currentUrl) {
currentUrl = currentUrl.replace(/\/\/\w+:\w+@/, '//');
var navSuccessful = new RegExp(appUrl).test(currentUrl);
var navSuccessful = new RegExp(appUrl + '.{0,230}$').test(currentUrl);
if (!navSuccessful) {
var msg = 'App failed to load: ' + appName +
' in ' + defaultFindTimeout + 'ms' +

View file

@ -1,5 +1,5 @@
import Bluebird from 'bluebird';
import { common, remote, defaultFindTimeout } from '../';
import { common, remote, defaultFindTimeout, headerPage } from '../';
export default (function () {
function SettingsPage() {
@ -30,6 +30,9 @@ export default (function () {
var self = this;
return common.findTestSubject('advancedSetting&' + propertyName + ' editButton')
.click()
.then(function () {
return headerPage.getSpinnerDone();
})
.then(function () {
return common.sleep(1000);
})
@ -38,9 +41,15 @@ export default (function () {
.findByCssSelector('option[label="' + propertyValue + '"]')
.click();
})
.then(function () {
return headerPage.getSpinnerDone();
})
.then(function setAdvancedSettingsClickSaveButton() {
return common.findTestSubject('advancedSetting&' + propertyName + ' saveButton')
.click();
})
.then(function () {
return headerPage.getSpinnerDone();
});
},
@ -88,6 +97,9 @@ export default (function () {
// close dropdown, keep focus
return self.getTimeFieldNameField().click();
})
.then(function () {
return headerPage.getSpinnerDone();
})
.then(function () {
return common.try(function () {
return self.getTimeFieldOption(selection).click()
@ -113,12 +125,18 @@ export default (function () {
clickCreateButton: function () {
return this.remote.setFindTimeout(defaultFindTimeout)
.findByCssSelector('.btn').click();
.findByCssSelector('.btn').click()
.then(function () {
return headerPage.getSpinnerDone();
});
},
clickDefaultIndexButton: function () {
return this.remote.setFindTimeout(defaultFindTimeout)
.findByCssSelector('button.btn.btn-warning.ng-scope').click();
.findByCssSelector('button.btn.btn-warning.ng-scope').click()
.then(function () {
return headerPage.getSpinnerDone();
});
},
clickDeletePattern: function () {
@ -148,7 +166,10 @@ export default (function () {
return chart.getVisibleText()
.then(function (chartString) {
if (chartString === columnName) {
return chart.click();
return chart.click()
.then(function () {
return headerPage.getSpinnerDone();
});
}
});
}
@ -245,6 +266,9 @@ export default (function () {
.findByCssSelector('button.btn.btn-default[aria-label="Plus"]')
.then(function (button) {
return button.click();
})
.then(function () {
return headerPage.getSpinnerDone();
});
},
@ -261,6 +285,9 @@ export default (function () {
.findByCssSelector('button.btn.btn-primary[aria-label="Cancel"]')
.then(function (button) {
return button.click();
})
.then(function () {
return headerPage.getSpinnerDone();
});
},
@ -269,6 +296,9 @@ export default (function () {
.findByCssSelector('button.btn.btn-success.ng-binding[aria-label="Update Field"]')
.then(function (button) {
return button.click();
})
.then(function () {
return headerPage.getSpinnerDone();
});
},
@ -277,6 +307,9 @@ export default (function () {
.findByCssSelector('form.form-inline.pagination-size.ng-scope.ng-pristine.ng-valid div.form-group option[label="' + size + '"]')
.then(function (button) {
return button.click();
})
.then(function () {
return headerPage.getSpinnerDone();
});
},
@ -289,6 +322,9 @@ export default (function () {
return self.getCreateButton().click();
});
})
.then(function () {
return headerPage.getSpinnerDone();
})
.then(function () {
return common.try(function () {
return self.remote.getCurrentUrl()