Protractor wait for angular application to be stab

2019-08-04 13:28发布

问题:

I have an issue when running e2e tests with Protractor. It seems the whenStable is being called too early (a fraction of a second early).

I load the data via guards, populate the store and then the containers receive this data via selectors which then pass the data down to the components.

My application is built with Angular 5 and ngrx 4.

Is there a way to successfully get whenStable to trigger at the right time without creating my own function for checking if an element is present?

Edited this post as it's no longer a remote baseUrl issue. I now have it happening locally.

I have a test application that seems to work as expected, but in my larger application, everything seems to happen a little too early.

回答1:

Im not sure if I understood the question correctly. But using browser.waitForAngular(); will wait for all angular components to load.