Skip to content

Conversation

@segovia
Copy link
Contributor

@segovia segovia commented Sep 8, 2022

No description provided.

@olivierwilkinson
Copy link
Collaborator

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 :)

@olivierwilkinson
Copy link
Collaborator

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 main so I think you need to update your fork and then the actions should work correctly.

The two tests for production React are skipped currently, I think we should get them passing in this PR :)

Copy link
Collaborator

@olivierwilkinson olivierwilkinson left a 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!) 🙌

@olivierwilkinson olivierwilkinson force-pushed the main branch 3 times, most recently from ecfc359 to aa72e73 Compare October 26, 2022 08:52
@olivierwilkinson
Copy link
Collaborator

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 :)

@olivierwilkinson olivierwilkinson merged commit 09183e8 into testing-library:main Oct 26, 2022
@olivierwilkinson
Copy link
Collaborator

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.

@github-actions
Copy link

🎉 This PR is included in version 3.0.7 🎉

The release is available on:

Your semantic-release bot 📦🚀

@segovia
Copy link
Contributor Author

segovia commented Oct 26, 2022

@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

@olivierwilkinson
Copy link
Collaborator

I made a separate PR for that, as requested. #45

Thank you for doing that! I'll get on merging that later today 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants