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
Headless render tests: @storybook/test-runner support or Storyshots alternative? #534
Comments
Test runner should work out of the box for react native web, it's no different than running for reactjs which is why there isn't specific documentation on that. If that doesn't work for you please let me know what issue you run into. In terms of plans for testing I want to get unit testing working with composeStory and testing library. I've seen it work with some small hacks, i believe all that's needed is to take composeStory out of storybook/react and put a version of it in storybook/react-native. Test runner on native is not really possible In the same way as far as i know. That's because we can't use testing library API's at runtime, they run in a sort of fake dom not a real rn app. The best we can do is a detox integration for example automatic visual testing similar to chromatic is something that I've already prototyped and want to do but its a lot of work ahead. once v7 is out i will put testing top of the list |
Installing Trying to remove this line to try skip the issue will then cause other errors pertaining to resolving modules internal to |
@flochtililoch oh right I see what you mean, I guess thats a problem with being on 6.5 for compatibility with react native storybook. On v7 react native web works well with the test-runner but I haven't recently tried configuring things with 6.5, I'm working on getting v7 for ondevice so hopefully I could solve this by getting us to v7 😅. |
I wonder what the plan is with regards to headless rendering tests for @storybook/react-native.
I've used Storyshots for the longest time, but it's now deprecated, and the recommended replacement seem to be @storybook/test-runner, which is not directly compatible with React Native. Supposedly it can work if react-native-web is configured (but undocumented for now, does not work out of the box), but this seems a regression over the simplicity of Storyshots (at least, from a "user" perspective, I can't speak about the internals of Storyshots).
Does anyone have perspective on what the road map looks like in that regard?
The text was updated successfully, but these errors were encountered: