Refactored DevTools test shell for e2e#22968
Merged
bvaughn merged 1 commit intofacebook:mainfrom Dec 15, 2021
Merged
Conversation
bvaughn
commented
Dec 15, 2021
| await page.goto('http://localhost:8080/', {waitUntil: 'domcontentloaded'}); | ||
| await page.waitForSelector('iframe#target'); | ||
| frameElementHandle = await page.$('#target'); | ||
| await page.goto('http://localhost:8080/e2e.html', {waitUntil: 'domcontentloaded'}); |
Contributor
Author
There was a problem hiding this comment.
Longer term, relying on our test shell for e2e tests seems too fragile. Changing one shouldn't break the other. So I added a specific e2e target.
bvaughn
commented
Dec 15, 2021
| "start": "yarn start:app", | ||
| "start:app": "cross-env NODE_ENV=development cross-env TARGET=local webpack-dev-server --open-page app.html", | ||
| "start:multi": "cross-env NODE_ENV=development cross-env TARGET=local webpack-dev-server --open-page multi.html" | ||
| "start": "cross-env NODE_ENV=development cross-env TARGET=local webpack-dev-server" |
Contributor
Author
There was a problem hiding this comment.
I renamed the app.html file to index.html and added a small nav bar up top so we can get rid of these separate targets.
bvaughn
commented
Dec 15, 2021
| root.render(createElement(App)); | ||
| } | ||
|
|
||
| mountApp(ToDoList); No newline at end of file |
Contributor
Author
There was a problem hiding this comment.
We might want to add e2e-specific things rather than reuse our ToDo app but this is okay for now.
6f4e76c to
cf679b5
Compare
Contributor
Author
|
Looks like NPM services are down at the moment so the Circle CI failures are not surprising (but also not caused by this PR). |
cf679b5 to
6e259a3
Compare
This partially fixes a regression in the e2e target and makes things easier (hopefully) going forward when adding new e2e tests.
6e259a3 to
195490d
Compare
lunaruan
approved these changes
Dec 15, 2021
zhengjitf
pushed a commit
to zhengjitf/react
that referenced
this pull request
Apr 15, 2022
Fixes a regression in the e2e target and makes things easier (hopefully) going forward when adding new e2e tests.
nevilm-lt
pushed a commit
to nevilm-lt/react
that referenced
this pull request
Apr 22, 2022
Fixes a regression in the e2e target and makes things easier (hopefully) going forward when adding new e2e tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a regression in the e2e target and makes things easier (hopefully) going forward when adding new e2e tests.
I think we should follow up with a few things after this:
"span[class^=Value]"(maybe the Test Selector API could help with this?)