Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

$http doesn't immediately increment $brower's outstandingRequestCount. Protractor issues result. #13782

Closed
@wbyoko

Description

@wbyoko

http://jsfiddle.net/awtwff3x/ (using Angular 1.4.8)

The issue is that using $http doesn't seem to register with $browser.defer synchronously so that $browser.notifyWhenNoOutstandingRequests waits accordingly.

This has created an issue where protractor tests are flaky because they aren't waiting for resources to load.

Also seems with $timeout registering synchronously using a $timeout anywhere in a controller will allow for the $http request to register and have the protractor test wait correctly.

You can uncomment line 22 to see that requests queue after $timeout is used, otherwise notifyWhenNoOutstandingRequests returns synchronously.

Thanks.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions