mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
updating tests to not depend on angular.scope()
This commit is contained in:
parent
d1c6ce47ad
commit
4f83b21a85
1 changed files with 0 additions and 46 deletions
|
@ -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();
|
||||
})
|
||||
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue