Comments (7)
@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 😅.
from react-native.
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
from react-native.
test-runner
is only compatible with Storybook 6.X until version 0.9.4, and installing 0.9.4
cause this issue locally for me:
Validation Error:
Module @storybook/test-runner/playwright/transform in the transform option was not found.
<rootDir> is: /Users/f/project
Configuration Documentation:
https://jestjs.io/docs/configuration
Installing 0.16.0
, or 0.12.0
as suggested here yields the same error.
Trying to remove this line to try skip the issue will then cause other errors pertaining to resolving modules internal to test-runner
. Feels like I'm running into a dependency hell.
from react-native.
Hey @flochtililoch you could try checking this recipe out as an alternative to storyshots:
https://storybook.js.org/docs/writing-tests/storyshots-migration-guide#with-portable-stories
from react-native.
Related Issues (20)
- Unable to resolve module @storybook/addon-links/register HOT 1
- Issue running react-native-server on the example app HOT 10
- Custom font usage HOT 4
- Removing demo component from causes issues HOT 3
- use with ``react-native-linear-gradient`` in storybook project HOT 4
- [Regression] Stories configuration object not working with auto titles HOT 2
- using `configure` leads to CSF story not showing in the stories list until hot reload is triggered HOT 4
- Unable to resolve "@storybook/react/dist/config" from "node_modules/@storybook/react-native/dist/preview.js" HOT 4
- Unit tests for Storybooks failing in React Native 0.73.1 HOT 3
- Unable to resolve module react/jsx-runtime in low version of React
- ColumnWrapperStyle not supported for single column lists HOT 8
- Android Bundling failed 3112ms Unable to resolve "@storybook/react-native" from ".storybook/index.tsx" HOT 12
- Add 'check' option in @storybook/addon-ondevice-controls HOT 5
- Documentation improvement request
- HMR issues HOT 4
- [Bug]: Passing props to TextInput causes error HOT 4
- Sidebar doesn't display stories with react-native-tvos HOT 11
- @storybook/react-native webpack bundler support HOT 2
- Generates TypeScipt while project is JS HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native.