Open will-ks opened 8 months ago
Thanks for the bringing this to our attention @will-ks. I'll make sure to relay to the team to get their thoughts.
Thanks for your well written issue report @will-ks The team prioritizes React Server Components right now, and won't have time to look into this for a few weeks/months.
If someone from the community submitted a PR I or someone else will review it, but unfortunately that's all I can commit anyone to right now :(
What's not working?
After setting up mantine components with
yarn rw setup ui mantine
and using any mantine component, the tests will fail due to:The fix for this would be to add
MantineProvider
to thereact-testing-library
wrappers (ie. here https://github.com/redwoodjs/redwood/blob/main/packages/testing/src/web/customRender.tsx#L20).Ideally the setup command would handle this, but if not possible, maybe the docs could be updated to describe how to get around this yourself?
I have done the following to work around the issue:
const customRender = (ui: ReactElement, options?: RenderOptions) => render(ui, { wrapper: (props) => (
})
export { customRender as render }