Comments (1)
storybook seems like a winning approach for visualizing the ui states (including the hard part, i18n) we want to screenshot. not only can we browse ui states at our leisure, we get jest snapshot tests for free with storyshots! some pages may take some refactoring for this to work well, but that's very doable - no different than any other integration test, and way better than simulating clicks to setup the state we want to screenshot. I've used storybook before and have this part working.
frameit looks promising for fancypants screenshot postprocessing, though I haven't tried it yet. maybe later.
actually taking the screenshots automatically has been a bit harder:
- screengrab was what I'd hoped to use, but it appears to require ejecting from expo. also, no good for ios (though that's not a showstopper, we can fake it by hiding system ui)
- storycap refuses to connect to my @storybook/react-native-server, so it does nothing. debugging/troubleshooting has failed me, including the usual suspects of wipe/reinstall node_modules and local-network-ip instead of localhost.
- takeSnapshotAsync looks promising, but it appears gone in the latest version of expo, and I'd have to do quite a bit of test setup to use it since it's much lower-level than screengrab/storycap
also, all of these require an emulator - inevitably making CI runs slow and flaky, or if we leave it out of ci for faster runs, dep upgrades will break it when we need it.
...I think this automation is starting to cost more than the task it's automating. it might be best to take screenshots manually. if storybook's managing ui state for us, manual screenshotting is still tedious but not painful, and we don't have to do it often - and if we do solve automated screenshotting, storybook's still good for state management.
from freecbt.
Related Issues (20)
- Feature Request: Import data from Quirk HOT 2
- upgrade android targetSdkVersion
- Link to cbt guide from form?
- upgrade all deps, enable dependabot HOT 1
- FormScreen: Can't perform a React state update on an unmounted component
- lagging dependency upgrades HOT 1
- missing ios icons HOT 3
- Trackers & Permissions (exodus report) HOT 4
- Bad android reminder icon HOT 2
- android: empty margin at bottom of form
- Fdroid or provide apk HOT 4
- Intro images say quirk
- feature request: Export diary to pdf. HOT 1
- "save and add another" and "save and go to index" buttons on final page
- Can't select text on Android
- possible feature: show distorted thought while on other steps HOT 1
- Distortions become randomly selected
- the language picker should always use the English file's list
- GitHub release
- expo 38 upgrade HOT 2
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 freecbt.