-
Notifications
You must be signed in to change notification settings - Fork 27.4k
waitForAngular does not wait for $httpBackend pass through requests #15593
Comments
I think we need to come up with a better way to get hold of the "original" |
I think the easiest option is to change the |
Couldn't ngMock's decorator then also support a passThrough() API similar to ngMockE2E's? Then there might be no need to load ngMockE2E into a unit/integration test. BTW, I personally have no need to use passThrough() in unit/integration tests and the whole idea smells bad to me, but there seems to be some momentum for it. |
One could add the |
The fix from angular#13124 enabled ngMock and ngMockE2E to work together but did it in a way that meant that the "real" `$httpBackend` service that was used in pass-through depended upon a different `$browser` service to the rest of the app. This broke Protractor since it watches the `$browser` for outstanding requests and the pass through requests were being tracked by the wrong `$browser` instance. Closes angular#15593
@mike-bresnahan - you can see I have put together a PR for this. Can you take a look? |
The fix from #13124 enabled ngMock and ngMockE2E to work together but did it in a way that meant that the "real" `$httpBackend` service that was used in pass-through depended upon a different `$browser` service to the rest of the app. This broke Protractor since it watches the `$browser` for outstanding requests and the pass through requests were being tracked by the wrong `$browser` instance. Closes #15593
Interestingly, the outstandingRequestCount issue was fixed in 1.6 by 4f6f2bc. There are still two $browser services in 1.6, but the primary one keeps track of passThrough requests along with other requests. |
Since #15601, there should be one |
@mike-bresnahan glad that we were able to help. |
The fix from angular#13124 enabled ngMock and ngMockE2E to work together but did it in a way that meant that the "real" `$httpBackend` service that was used in pass-through depended upon a different `$browser` service to the rest of the app. This broke Protractor since it watches the `$browser` for outstanding requests and the pass through requests were being tracked by the wrong `$browser` instance. Closes angular#15593
This change #13124 related to this issue #1434 caused this protractor issue angular/protractor#3948.
Node v6.9.2
Protractor 4.0.14
Angular 1.5.8
Chrome 55.0.2883.87
Windows 7
The text was updated successfully, but these errors were encountered: