Protractor E2E test times out when app polls an API at regular intervals
See original GitHub issueOur app has a poller which makes calls to an API every 3 seconds. When I load a page with has an active instance of the poller Protractor will always time out.
The poller is started when the page loads and uses the Angular $timeout
function.
Is there a way to get Protractor to ignore the poller or send a signal to the app to pause the poller momentarily so the E2E test can finish running?
Issue Analytics
- State:
- Created 10 years ago
- Comments:32 (14 by maintainers)
Top Results From Across the Web
Protractor Tutorial: Handling Timeouts With Selenium
Protractor waits indefinitely and then time out if the AngularJS application continuously checks $timeout or $http. You can use the $interval ...
Read more >How to implement intervals/polling in angular2 to work with ...
I have an angular2 app I want to test with protractor. In this app I have a page with a graph that is...
Read more >9 Understanding timeouts - Testing Angular Applications
Because Protractor tests involve many different pieces working together, there are different kinds of timeouts. For example, Jasmine will mark your test as ......
Read more >Timeouts - Protractor - end-to-end testing for AngularJS
If your AngularJS application continuously polls $timeout or $http, Protractor will wait indefinitely and time out. You should use the $interval for anything ......
Read more >Testing with Protractor: how to fix synchronization issues
If your AngularJS application continuously polls $timeout or $http, Protractor will wait indefinitely and time out. To fix infinite timeout, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Given that Angular 2, as of yet, at least to my knowledge, does not provide an interval service for polling. Would you propose people using protractor to test angular 2 apps workaround this issue? In cases where dropping synchronization is not possible. In our use case we have a timeout of 20 minutes, set up as a sort of ticker, to revalidate a JWT token. When our protractor tests hit the homepage, they sit there waiting for a 20min timeout.
Cheers, Nuno
I use 7mins spec timeouts, also have long running e2e tests: