angular-vis
angular-vis copied to clipboard
ng2-vis, zone and protractor
Hi,
We are trying to test an angular application that has a component exploiting the network directive, but protractor fails in its tests with the following error when the component is shown:
Failed: Timed out waiting for asynchronous Angular tasks to finish after 30 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
From what we understood, the problem is that there is something in the network element on the page that runs tasks (maybe with setInterval
?) from within the angular zone and thus protractor considers that the page is not stable.
As explained on the timeout page of protractor, this kind of things usually should be run outside the angular zone, and this should also improve performances (by avoiding useless change detection).
@maxime1992 @victornoel
Apparently the problem is coming from the network option autoResize
which uses a setInterval
.
Setting it to false make things work in protractor.
I think this should be solved by ng2-vis, but I'm not clear how :)