mirror of
https://github.com/zhigang1992/angular.js.git
synced 2026-04-18 12:08:17 +08:00
fix e2e runner's browser.location methods
when we stopped exposing $location service on the root scope the scenario runner was not modified to access the $location service via $service The following apis were affected: - browser().location().hashSearch() - browser().location().hashPath() - browser().location().search()
This commit is contained in:
@@ -86,19 +86,19 @@ angular.scenario.dsl('browser', function() {
|
||||
|
||||
api.search = function() {
|
||||
return this.addFutureAction('browser url search', function($window, $document, done) {
|
||||
done(null, $window.angular.scope().$location.search);
|
||||
done(null, $window.angular.scope().$service('$location').search);
|
||||
});
|
||||
};
|
||||
|
||||
api.hashSearch = function() {
|
||||
return this.addFutureAction('browser url hash search', function($window, $document, done) {
|
||||
done(null, $window.angular.scope().$location.hashSearch);
|
||||
done(null, $window.angular.scope().$service('$location').hashSearch);
|
||||
});
|
||||
};
|
||||
|
||||
api.hashPath = function() {
|
||||
return this.addFutureAction('browser url hash path', function($window, $document, done) {
|
||||
done(null, $window.angular.scope().$location.hashPath);
|
||||
done(null, $window.angular.scope().$service('$location').hashPath);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user