-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
<Tabs/> failed snapshot testing if it's scrollable #10783
Comments
@thaindq The issue comes from react-scrollbar-size. We can't do much about it here. I would encourage you to submit the issue on their side. cc @shawnmcknight |
@thaindq I haven't utilized react-test-renderer before, but from what I am gathering it does not have the ability to deal with refs which is what react-scrollbar-size is doing. I cross-referenced facebook/react#9244 which links to Mocking Refs for Snapshot Testing. If there is a way for this to be resolved within the repo itself, I'm happy to accept a PR, but its outside the scope of anything I'm going to personally be able to implement in the short-term. |
@shawnmcknight Thanks for link. I believe Jest provides the tools needed to handle this use case. Let's close :). |
@oliviertassinari I am getting a similar sentry error sometimes on medium screen size device (iPad) when I rotate the screen.
Please let me know if you have any suggestions. Thanks! |
@gaurikolhe How can we reproduce? |
@oliviertassinari I would leave the page idle (I don't have an exact time period from the bug filer), and then rotate the device (iPad) from portrait to landscape (I set responsive design mode of the browser to iPad for debug). It doesn't happen consistently. Thanks! |
@gaurikolhe I can't reproduce with the documentation of the tabs. If you have a minimal live reproduction on v5, please open a new issue. Codesandbox can be really helpful. |
@oliviertassinari I created new issue #26587. I also added steps on how to reproduce it on Codesandbox. Thank you. |
Expected Behavior
The test case should have passed
Current Behavior
Running a snapshot test case using Jest with
scrollable
Tabs component produces this error:Steps to Reproduce (for bugs)
See https://codesandbox.io/s/vyn1xjwpw7
Context
Your Environment
The text was updated successfully, but these errors were encountered: