Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Angular's testability API to wait for end of e2e tests #3829

Closed
tbosch opened this issue Aug 25, 2015 · 5 comments
Closed

Use Angular's testability API to wait for end of e2e tests #3829

tbosch opened this issue Aug 25, 2015 · 5 comments
Assignees
Labels
area: testing Issues related to Angular testing features, such as TestBed effort2: days feature Issue that requests a new feature
Milestone

Comments

@tbosch
Copy link
Contributor

tbosch commented Aug 25, 2015

Right now, we rely on a hack to wait for the end of e2e tests: We wait until the "loading..." text disappears. However, Angular exposes an API to know when bootstrap is done via global.getAllAngularTestabilities() (see https://github.com/angular/angular/blob/master/modules/angular2/src/core/testability/get_testability.ts). We should use this API to prevent future breakages / hard to explain errors...

@tbosch
Copy link
Contributor Author

tbosch commented Aug 25, 2015

The hack was introduced here: #3822

@mhevery mhevery added this to the alpha-37 milestone Aug 25, 2015
@mhevery mhevery added feature Issue that requests a new feature P1: urgent effort2: days area: testing Issues related to Angular testing features, such as TestBed labels Aug 25, 2015
@marclaval
Copy link
Contributor

Not as easy as it seems since we have tests which need to wait for Angular 2, and some that don't.
If waiting can be done with the Testability API, we need a way to find out if a particular a test needs to wait.

@tbosch Any suggestion on how to achieve that in a generic way please? I.e. without setting a flag or doing it in each test?

@tbosch
Copy link
Contributor Author

tbosch commented Aug 27, 2015

I think for the examples/benchmarks that don't use bootstrap we should just create the Testability registry manually in the example/benchmark, so that the integration works for all e2e tests.

@juliemr
Copy link
Member

juliemr commented Oct 1, 2015

FYI, this should eventually be done in Protractor. Setting up the next Protractor release to take care of it.

@naomiblack naomiblack modified the milestones: alpha-37, alpha-39 Oct 4, 2015
@IgorMinar IgorMinar modified the milestones: alpha-39, alpha-40 Oct 5, 2015
@IgorMinar IgorMinar assigned juliemr and unassigned marclaval Oct 6, 2015
juliemr added a commit to juliemr/angular that referenced this issue Oct 7, 2015
The latest Protractor version supports waiting for Angular2 applications,
so remove custom waiting logic.

Closes angular#3829
juliemr added a commit to juliemr/angular that referenced this issue Oct 7, 2015
The latest Protractor version supports waiting for Angular2 applications,
so remove custom waiting logic.

Closes angular#3829
juliemr added a commit to juliemr/angular that referenced this issue Oct 7, 2015
The latest Protractor version supports waiting for Angular2 applications,
so remove custom waiting logic.

Closes angular#3829
@juliemr juliemr closed this as completed in af11190 Oct 7, 2015
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: testing Issues related to Angular testing features, such as TestBed effort2: days feature Issue that requests a new feature
Projects
None yet
6 participants