-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Add Portal support #1263
Add Portal support #1263
Conversation
Hey folks, any news here? I really want to enable tests for my React portal components 👍 |
Are any efforts being made to provide portal support? This seems to be the final bit in migrating our code base (and its Enzyme tests) to React 16. |
I've merged master into this PR and tests seem to work. |
@jquense please rebase PRs from the command line when updating them, so as to avoid merge commits :-) |
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.
Thanks; this is a good start! We’d definitely need tests for it; see the enzyme-test-suite dir for guidance.
@ljharb Sorry, it's not that i'm unsure how/where to write a test, but how to write ones that sufficiently test the change to ya'lls satisfaction. A single test that does a thanks for the review! |
I think that the simple test you describe would be the minimum of what we'd want; ideally, we'd write tests for all the traversal methods, to ensure that none of them throw. |
@jquense Are you planning on writing the test? If not, I could take a crack at it. |
I'm planning on it but a bit busy, happy to get some help :) |
015a967
to
6fd680b
Compare
- add Portal support (enzymejs#1150, enzymejs#1263, enzymejs#1338, enzymejs#1345)
- add Portal support (enzymejs#1150, enzymejs#1263, enzymejs#1338, enzymejs#1345)
I’m happy to add tests, but i don’t really understand the test suite nor where the appropriate place to add them is for the v16 only feature.
@aweary from what I can tell the Portal fiber is similar to a host component in that it’s essentially a transparent wrapper over it’s rendered children. It does hold some host container info which may be required for actual DOM traversal but in terms of the RST tree this should give an accurate representation as React sees it.