I have a medium sized Angular application and for some reasons some of my protractor tests are timing out when run against my live production environment.
I am fairly sure the timeouts happen because of protractor waiting on some asynchronous task. I know about zones and I tried to keep all long running async tasks out of the ngZone (as per the FAQ), but for some reason protractor is still timing out.
It's possible I missed something but I don't know how to debug the problem. Is there any way to find out which part of the code protractor is waiting on?
The NgZone only exposes functions to determine if there are microtasks or macrotasks running, but doesn't tell me which one.
EDIT: A typical example of such a timeout error as shown by protractor:
Failed: Timed out waiting for asynchronous Angular tasks to finish after 11 seconds. This may be because the current page is not an Angular application. Please see the FAQ for more details: https://github.com/angular/protractor/blob/master/docs/timeouts.md#waiting-for-angular
While waiting for element with locator - Locator: By(css selector, [data-e2e='scroll-to-offer'])
The element exists on the page (I have verified this manually), but protractor still times out.
tick(milliseconds: number);
– Никита Середа