Comments (2)
I too agree on this. It should be easy to test things directly in Storybook. Right now, I'm not sure I see it being more than "something to fix in the end", at least for bigger changes. It might be worth to seek out some recommended practises, what's available in terms of practice for mocking, etc.
from wp-calypso.
👍 We could use something like msw-storybook-addon to mock API requests in stories. I have used this previously and it seemed to work well. Approach is basically:
import { http, HttpResponse } from 'msw';
import sitePlans from 'fixtures/site-plans.json';
const meta: Meta< typeof FeaturesGrid > = {
...
msw: {
handlers: [
http.get('https://public-api.wordpress.com/rest/v1.3/sites/[:id]/plans', () => {
return HttpResponse.json(sitePlans);
}),
],
}
from wp-calypso.
Related Issues (20)
- Task: Ensure we refresh the WPCOM plan data after completing a migration HOT 2
- Site Migration: extend timeout for plugin installs
- Unable to detach synched patterns on a few sites using Creatio 2 and Assembler HOT 1
- In `@automattic/components`, list `qrcode.react` and `@automattic/color-studio` as dependencies, not devDependencies
- Feature Request: Move Deleted Sites to a Separate Tab and Out of the Production Active Sites List HOT 2
- /me: Part of the navigation is impossible to see (Untangling Calypso) HOT 3
- Email notifications: not all email clients format the email templates the same HOT 6
- Stepper: only trigger `calypso_signup_step_start` Tracks events when step is actually rendered
- CSP Followup for inline-scripts
- Scheduled Updates: Scroll back to top after creating (and potentially editing) a schedule
- Captions Global Styles for Stewart Theme
- Sites management page: Renamed site addresses should not be listed as deleted sites HOT 3
- Activity Log: Differentiate between WP-CLI used by Support or Users via SSH HOT 5
- Impossible to unlock blocks HOT 5
- Inconsistent Plan name in marketing email subject HOT 2
- Stepper: improve `calypso_signup_start` tracking
- Command Palette: WP-CLI Command Wildcards
- Scheduled updates: Update layout for the single site context
- HTML Block - Preview button: Unconsistent Javascript Code Handling Depending On Browser HOT 3
- Site Migration: Possible to get to old flow through new flow
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 wp-calypso.