-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Test bed with context discovery #26211
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
Test bed with context discovery #26211
Conversation
3316be8
to
eba6795
Compare
eba6795
to
2bedc95
Compare
The Last SHA LGTM |
70c5497
to
b885930
Compare
b885930
to
821af4d
Compare
821af4d
to
8b69fd4
Compare
You can preview 8b69fd4 at https://pr26211-8b69fd4.ngbuilds.io/. |
8b69fd4
to
b473dd7
Compare
You can preview b473dd7 at https://pr26211-b473dd7.ngbuilds.io/. |
b473dd7
to
9f0923c
Compare
You can preview 9f0923c at https://pr26211-9f0923c.ngbuilds.io/. |
9f0923c
to
28293c3
Compare
You can preview 28293c3 at https://pr26211-28293c3.ngbuilds.io/. |
28293c3
to
d144989
Compare
You can preview d144989 at https://pr26211-d144989.ngbuilds.io/. |
d144989
to
74fa57f
Compare
You can preview 74fa57f at https://pr26211-74fa57f.ngbuilds.io/. |
74fa57f
to
fbb1cb7
Compare
You can preview fbb1cb7 at https://pr26211-fbb1cb7.ngbuilds.io/. |
}); | ||
|
||
it('should display: Hello Foo! via name attribute', function () { | ||
browser.get('hello-world.html'); | ||
const helloWorldEl = element(by.css('hello-world-el')); | ||
const input = element(by.css('input[type=text]')); | ||
input.sendKeys('F', 'o', 'o'); | ||
expect(helloWorldEl.getText()).toEqual('Hello Foo!'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes to this file are due to the flaky e2e tests that seem to be unrelated to this PR as I saw it on other, completely different PRs, ex.:
- https://circleci.com/gh/angular/angular/84387 from fix(upgrade): properly destroy upgraded component elements and descendants #26209 (comment)).
- https://circleci.com/gh/angular/angular/84352 from refactor(ivy): merge directives into LViewData #26316
- https://circleci.com/gh/angular/angular/84325 from fix(ivy): removing false-negative assert in getOrCreateNodeInjector function #26305
Seems like getText()
is async and we wait for on it in other tests:
div.getText().then(t => expect(t).toEqual(`Hello world!`)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe @robwormald has additional input here - my Protractor kung-fu is too weak here...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getText()
is indeed async, but (theoretically at least) waiting shouldn't make any difference (because Protractor will internally wait for async WebDriver methods before checking assertions).
This test is indeed quite flakey lately. If this change makes it less flakey, \o/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently, many people have found this workaround useful. Maybe worth trying (if promise chaining doesn't make a difference).
fbb1cb7
to
646c714
Compare
You can preview 646c714 at https://pr26211-646c714.ngbuilds.io/. |
646c714
to
c410d67
Compare
You can preview c410d67 at https://pr26211-c410d67.ngbuilds.io/. |
c410d67
to
be28148
Compare
You can preview be28148 at https://pr26211-be28148.ngbuilds.io/. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This PR re-implements TestBed for ivy on top of context discovery. Please review only the last commit (
refactor(ivy): use context discovery in TestBed implementation
) - the 2 first ones are part of existing PRs #26113 and #26210