GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||
GeezerVison is showing github.com — Proof of Concept for E2E tests using playwright by akgupta0777 · Pull Request #22754 · react/react Conversation
Contributor
SummaryDetailed discussion here : #22646 What does the test do ?It checks the components(ToDo List) and emulates it in the devtools by clicking and inspecting. How did you test this change?run Quick Demo 👀POC.mp4Description of some other changesRemoved hashing on CSS styles to write tests easily. This has no impact on the Styling or any visual changes on test apps in
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
bvaughn
reviewed
|
| await expect(text).toEqual(listItemsProps[i]); | ||
| } | ||
| }); | ||
| }); |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Love how simple these tests are.
Slightly uncomfortable about how coupled they are with the test shell harness.
Seems like it would be ideal if the e2e tests setup their own test apps (kind of like our unit tests do) and then tested how DevTools interacted with those. That way, changes to the test shell wouldn't accidentally break tests– and we could add new e2e tests without needing to change the test shell in ways that may make it more cumbersome to work for its primary use case (locally iterating).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
e8a8c7a to
5bdcd71
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This is a great initial proof of concept to get things started. Thank you! <3
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Oh interesting. When trying to run the new test target locally I see an error: Any suggestions, @akgupta0777? In case it's relevant: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@bvaughn can you give me more context about what you are trying to do For some reason if you use ES6 syntax with playwright you get an error. Will investigate further into this. I also got this kind of issue when I tried to import clipboardy(npm package) for testing clipboard functionality of devtools. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Nothing. Literally just tried to run the new test target you added: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
You have to build the inline package and start the shell Webpack dev server by running Then run |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I was running both inline and shell watch processes, so localhost:8080 was serving the test app. This is a syntax error coming from the |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Just to be clear, here's what I've done: yarn install scripts/release/download-experimental-build.js --commit=main cd packages/react-devtools-inline yarn start # In another shell cd packages/react-devtools-shell yarn start After verifying that localhost:8080 loads okay: This doesn't seem like it has anything to do with the test shell. It's seems to be a syntax error coming from Playwright trying to load uncompiled code. Can you confirm that you're able to do a fresh checkout of this repository and the above steps work for you, @akgupta0777 ? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I can't reproduce the error on my laptop. I want to know why react-is package is interfering Will confirm you after I make a fresh react clone and running test in some hours. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@bvaughn I can now confirm that the tests are not working on the latest version of playwright. I did Now I am working on a fix for that. It's an issue with playwright recent changes to the library I guess. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks @akgupta0777! 🙇🏼 Keep me posted :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Excellent. Thank you |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
If an older version of Playwright works for this, we could also just use the Doesn't seem ideal but I thought it would be worth mentioning. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
It seems like its the issue with playwright but it isn't. Because it worked magically once when I tried on a fresh react clone on the latest version of playwright. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@bvaughn What I did: Why I did this Conclusion |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
That's an interesting observation. :)
Unfortunately this doesn't really work as a solution in this repo, because we can't ask people to We'll have to get the dependencies setup correctly so this works for everyone (including CI) without extra manual steps. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Tests are runnable with #22790. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Yeah I agree. This is a workaround not a complete solution. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
That's some great news. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.