Closed turnerhayes closed 5 years ago
Can you please fill out the entire issue template?
From the linked issue, it looks like an interaction between memo and forwardRef.
Done! Let me know if there's any more information that would be useful.
It would have been even better without Material-UI as a dependency of the codesandbox.
Thanks, this is enough to reproduce.
Great! Thanks for the quick turnaround! When will this be published on NPM?
as soon as i have time; hopefully today.
it stoped working again after material-ui/core 4.7.0 update(works on 4.6.1): https://codesandbox.io/s/blissful-mendeleev-3vj5l
@gReis89 sounds like they had a breaking change in a minor version; i'd file an issue.
Is this related to https://github.com/mui-org/material-ui/issues/15928?
@oliviertassinari it may be a similar cause; but that was the cause of the OP. The latest report is something new.
It seems different, indeed. What could explain this new behavior?
Perhaps a change in display name, or they changed the number of HOC wrappers on a component? Not really sure, I'm not familiar with material UI.
I filed this bug with Material UI, but they seem to think it's an Enzyme bug. One of the MUI team members there commented that
Current behavior
Enzyme doesn't even seem to recognize that the icon is of the type of the icon; that is,
displays
false
. As a result, if I have anIconButton
that contains<EditIcon/>
, Enzyme doesn't find it.See https://codesandbox.io/s/fervent-bash-5ys2g
Expected behavior
mount(<ComponentContainingMUIIcon />).find(MUIIcon)
should return a wrapper for the icon.Your environment
API
Version
Adapter