You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @JuanSeBestia
Thank you for creating a detailed issue.
Could you confirm your expected test flow in detail?
I've played with codesandbox and narrowed down the issue towards the fact that useMediaQuery hook returns false in jsdom environment, hence the MobileTimePicker is actually rendered instead of DesktopTimePIcker.
Could you confirm whether you were expecting to test a desktop picker flow?
I was unable to mock useMediaQuery in codesandbox due to it not supporting jest globals.
I've successfully resolved an error in a simple controlled TimePicker test case by mocking @mui/material/useMediaQuery response as true:
If this is actually your root cause, please use the mock as a temporary workaround and we'll look into whether we can do anything about it on our side.
I believe that I write something before but I write it again
Thanks very much to clarify that another component is rendered that I don't expect. Really I just want a way to test my flow using your components, So knowing that is rendered mobile version, I used the input in edit view with the input, I'm implement in the same live demo with the name TimePickerExample test with input mobile, So you can close this issue or wait until your MR are ready to re implement my tests
Duplicates
Latest version
Current behavior 😯
I'm trying to test this component with testing-library, but I can't trigger onChange event
This issue is related #4985
Expected behavior 🤔
the components has an example to use with some framework to do atomatizated tests
Steps to reproduce 🕹
Link to live example:
https://codesandbox.io/s/react-testing-library-timepickerexample-f1wly6?file=/src/__tests__/TimePickerExample.test.js
See the tab tests
Context 🔦
Integration tests
Your environment 🌎
All the env information are available in live example
Order ID 💳 (optional)
No response
The text was updated successfully, but these errors were encountered: