Open rburgst opened 6 years ago
Hey @rburgst, thanks for reporting. I played a bit with your example and it turns out its pace-js who's blocking angular to complete so that the tests could start.
A solution here would be to run it out of angular zone, but I need to look into how can we do this for a 3rd party library that run's automatically.
In the mean time you can use browser.waitForAngularEnabled(false);
or remove pace-js from .angular-cli.json
file.
Hm, I can verify with the vanilla ngx-admin project it works now after removing pace.js from .angular-cli.json
, however, my real project is based on ngx-admin, it still shows the same behaviour.
How do you debug this and see who is still responsible for the timeout?
To be honest, I just guessed, as there are a lot of setTimeout calls inside of the pace-js source code. You can try a similar way or just by removing code parts and libraries until it works - not the best suggestion but might work :)
Issue type
I'm submitting a ...
Issue description
Current behavior: Its currently impossible to write stable protractor tests since ngx-admin seems to do some things under the hood that prevent protractor from finding out whether angular has settled or not.
If you run
on the following fork
https://github.com/rburgst/ngx-admin/commit/d077b2563a10550109081d9e8522d204ebde2367
you will get the following error
This happens after a trivial 2 step spec:
My real app is somewhat more involved but I am getting the same kinds of issues. Since the very same test works fine with a vanilla angular app, I am inclined to believe that ngx-admin or nebular has something to do with it.
Expected behavior: It should be possible to write robust protractor tests that dont timeout while waiting for angular.
Steps to reproduce:
Check out the following commit / repo
https://github.com/rburgst/ngx-admin/commit/d077b2563a10550109081d9e8522d204ebde2367
Related code:
https://github.com/rburgst/ngx-admin
Other information:
npm, node, OS, Browser
Angular, Nebular