Use findTestSubject

This commit is contained in:
Felix Stürmer 2017-02-13 17:02:08 +01:00
parent 345421bd63
commit 3a2f3fc9eb
No known key found for this signature in database
GPG key ID: F938FEB4935329DA

View file

@ -148,7 +148,7 @@ export default class HeaderPage {
try {
await this.isGlobalLoadingIndicatorVisible();
} catch (exception) {
if (exception.name === 'NoSuchElement') {
if (exception.name === 'ElementNotVisible') {
// selenium might just have been too slow to catch it
} else {
throw exception;
@ -158,8 +158,7 @@ export default class HeaderPage {
}
isGlobalLoadingIndicatorVisible() {
return this.remote.setFindTimeout(defaultFindTimeout)
.findByCssSelector('[data-test-subj="globalLoadingIndicator"]:not(.ng-hide)');
return PageObjects.common.findTestSubject('globalLoadingIndicator');
}
isGlobalLoadingIndicatorHidden() {