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
When I use jest/storyshots to run the snapshot tests. It shows an abnormal error (TypeError: Cannot read property 'decelerationRate' of undefined ):
FAIL storybook/Storyshots.test.js
● Storyshots › [Page] CountryPolicy › entry
TypeError: Cannot read property 'decelerationRate' of undefined
at Object.<anonymous> (node_modules/react-native/Libraries/Components/WebView/WebView.ios.js:555:3254)
at Object.get WebView [as WebView] (node_modules/react-native/Libraries/react-native/react-native.js:68:22)
at CountryPolicy (src/ui/CountryPolicy/CountryPolicy.js:11:43)
at node_modules/react-test-renderer/lib/ReactCompositeComponent.js:306:16
at measureLifeCyclePerf (node_modules/react-test-renderer/lib/ReactCompositeComponent.js:75:12)
at ReactCompositeComponentWrapper._constructComponentWithoutOwner (node_modules/react-test-renderer/lib/ReactCompositeComponent.js:305:14)
at ReactCompositeComponentWrapper._constructComponent (node_modules/react-test-renderer/lib/ReactCompositeComponent.js:280:21)
@xareelee - did you have any luck with this one? It sounds like an issue with React Native's implementation of the <WebView/> component which is still unresolved: facebook/react-native#12440.
Is there anything we can do to avoid the problem? It sounds like the issue is with refs inside the WebView so I don't think the issue @shilman mentioned above will help (although I'm not sure).
I'll close this for now, but @-me or comment on this issue if there is something we could do to work around it.
Issue by xareelee
Thursday Mar 16, 2017 at 09:26 GMT
Originally opened as storybook-eol/storyshots#86
When I use jest/storyshots to run the snapshot tests. It shows an abnormal error (
TypeError: Cannot read property 'decelerationRate' of undefined
):Source code:
Story:
The app displays normally. It seems something wrong when testing a DOM containing a
WebView
.The text was updated successfully, but these errors were encountered: