-
-
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
Can't find React Component. #536
Comments
I ran into this issue when using React Bootstrap and their modals / portals. My understanding is that Enzyme only looks for rendered children. In this case Gateway is not rendering anything. Instead I had to grab the child from the props. const dialog = wrapper.find('Portal');·
const confirmDialog = new ReactWrapper(dialog.node.props.children); Note: |
Yeah I'm pretty sure using @windyGex in your example it doesn't seem like anything is calling the Closing as this is essentially a duplicate of #252 |
I've been searching for the right solution for quite a while and @travisperson's solution is the only one that works with Enzyme. Just in case others are looking for some solutions. |
My bad it does :). |
@travisperson 's solution worked for me once I changed |
Consider the following code,Why
wrapper
can't findContent
?it will be error
expected 0 to equal 1
.The text was updated successfully, but these errors were encountered: