-
Notifications
You must be signed in to change notification settings - Fork 17
Fix issues related to using lib with selenium, react and shadow doms #38
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
Conversation
|
Looks like there is a problem with chrome, but it's likely to be an issue with the action as all the Firefox tests passed so my worry about the element refetching isn't a problem. When I get some time I'll fix chrome and add some tests for react and shadow dom and then let's get this going :) |
|
Heya, I've added tests for different services including Puppeteer and added some test cases for production React apps, the PR is here. It's already merged into The two tests for production React are skipped currently, I think we should get them passing in this PR :) |
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.
I like the idea of generating an id and using that to fetch the element, it is a definite improvement on returning the element directly. (and it removes the confusing aspects of createElement which I'm really happy about!)
There are a few things I think we should change but they shouldn't take too long to do I think. I've already confirmed the React tests that are skipped work when using the snippets I posted so we are very close 😄.
Thanks again for helping, such a relief to finally know what the issue is (and to be fixing it!) 🙌
ecfc359 to
aa72e73
Compare
aa72e73 to
e305cf7
Compare
|
I didn't realise you had given me write permissions on your fork, thank you! I've rebased onto this repo's main branch to get the latest changes / test updates and added a commit with my suggestions. Once the tests pass I'll merge :) |
|
Thanks again @segovia! Very happy that this is fixed. 🥳 I'll bump the version of dom-testing-library soon so that the increased support for shadow dom you wanted is included also. |
|
🎉 This PR is included in version 3.0.7 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
@olivierwilkinson Thanks for getting it merged! Keeping SimmerJS seemed to work OK with my set up, however there is still the issue of selecting elements within a shadow dom by role and name that have an aria-label. This is fixed by updating "@testing-library/dom" to "^8.17.1". I made a separate PR for that, as requested. #45 |
Thank you for doing that! I'll get on merging that later today 😁 |
No description provided.