fix($route): make asynchronous tasks count as pending requests
Protractor users were having a problem where if they had asynchonous code in a `route.resolve` or `route.resolveRedirectTo` variable, Protractor was not waiting for that code to complete before continuing. See https://github.com/angular/protractor/issues/789#issuecomment-190983200 for details. This commit fixes it by ensuring that `$browser#outstandingRequestCount` is properly increased/decreased while `$route` (asynchronously) processes a route. Also, enhanced `ngMock` to wait for pending requests, before calling callbacks from `$browser.notifyWhenNoOutstandingRequests()`. Related to angular/protractor#789. Closes #14159
S
Sammy Jelin committed
c522a43f41978245d0973ccb3a2a59ac5aec1a7e
Parent: 9c722cf
Committed by Georgios Kalpakas <kalpakas.g@gmail.com>
on 1/11/2017, 10:07:22 PM