Skip to content

Commit

Permalink
updating tests to not depend on angular.scope()
Browse files Browse the repository at this point in the history
  • Loading branch information
ppisljar committed Oct 29, 2016
1 parent d1c6ce4 commit 4f83b21
Showing 1 changed file with 0 additions and 46 deletions.
46 changes: 0 additions & 46 deletions test/support/page_objects/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,21 +110,6 @@ export default class Common {
self.debug('returned from get, calling refresh');
return self.remote.refresh();
})
.then(function () {
self.debug('check testStatusPage');
if (testStatusPage !== false) {
self.debug('self.checkForKibanaApp()');
return self.checkForKibanaApp()
.then(function (kibanaLoaded) {
self.debug('kibanaLoaded = ' + kibanaLoaded);
if (!kibanaLoaded) {
var msg = 'Kibana is not loaded, retrying';
self.debug(msg);
throw new Error(msg);
}
});
}
})
.then(function () {
return self.remote.getCurrentUrl();
})
Expand Down Expand Up @@ -216,37 +201,6 @@ export default class Common {
});
}

getApp() {
var self = this;

return self.remote.setFindTimeout(defaultFindTimeout)
.findByCssSelector('.app-wrapper .application')
.then(function () {
return self.runScript(function () {
var $ = window.$;
var $scope = $('.app-wrapper .application').scope();
return $scope ? $scope.chrome.getApp() : {};
});
});
}

checkForKibanaApp() {
var self = this;

return self.getApp()
.then(function (app) {
var appId = app.id;
self.debug('current application: ' + appId);
return appId === 'kibana';
})
.catch(function (err) {
self.debug('kibana check failed');
self.debug(err);
// not on the kibana app...
return false;
});
}

tryForTime(timeout, block) {
return Try.tryForTime(timeout, block);
}
Expand Down

0 comments on commit 4f83b21

Please sign in to comment.