-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Docs: Module mocking, and more #26858
Conversation
- Providers - Configuring mocked providers with parameters - Network requests - Bad link - Modules - Better mock files section - Using mocked files in stories
- Warning for absolute imports & mocking - Module aliases - Subpath imports - Mocking modules - `@storybook/nextjs/cache.mock` module API
- Decorators - Focus the "context" section on only that argument - Move irrelevant examples and snippets to the Story rendering page - Interaction Testing - Under the Write an interaction test section, add: - Run code before each test section - Mocked modules section
☁️ Nx Cloud ReportCI is running/has finished running commands for commit 2a0d245. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic job. ❤️
Co-authored-by: Jeppe Reinhold <jeppe@chromatic.com>
- Next.js - Add portable stories section - Mocking modules - Clarify requirements of mock files - Prose and snippet tweaks - Interaction testing - Bring over `mockdate` example - Prose and snippet tweaks
4e9b1ec
to
2ac03c4
Compare
Other improvements: - Consistency improvements in snippets throughout - Prose tweaks
Co-authored-by: Yann Braga <yannbf@gmail.com>
Co-authored-by: Yann Braga <yannbf@gmail.com>
Co-authored-by: jonniebigodes <joaocontadesenvolvimento@gmail.com>
- Re-order TOC items - Fix conditional content - Improve nextjs module API references - Make example snippets more consistent - Re-organize subpath imports section of module mocking guide - Fix typos, grammar
1d14a89
to
01c6509
Compare
docs/snippets/react/msw-addon-configure-handlers-graphql.js.mdx
Outdated
Show resolved
Hide resolved
- Make nextjs module alias usage more clear - Update msw graphql snippets - Add preact support for mocking providers - Prose improvements
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're getting there. Left some minor items for you to look into when you have a moment.
docs/snippets/react/configure-mock-provider-with-story-parameter.ts-4-9.mdx
Outdated
Show resolved
Hide resolved
- Snippet consistency - Prose tweaks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small item to address and this is good to go. Appreciate you addressing the feedback so promptly 🙏
Closes #26795, closes #26796, closes #26797
What I did
Add or update docs for:
test
propertiesChecklist for Contributors
Testing
Manual testing
module-mocking-docs
Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal
,ci:merged
orci:daily
GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli/src/sandbox-templates.ts
Make sure this PR contains one of the labels below:
Available labels
bug
: Internal changes that fixes incorrect behavior.maintenance
: User-facing maintenance tasks.dependencies
: Upgrading (sometimes downgrading) dependencies.build
: Internal-facing build tooling & test updates. Will not show up in release changelog.cleanup
: Minor cleanup style change. Will not show up in release changelog.documentation
: Documentation only changes. Will not show up in release changelog.feature request
: Introducing a new feature.BREAKING CHANGE
: Changes that break compatibility in some way with current major version.other
: Changes that don't fit in the above categories.🦋 Canary release
This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the
@storybookjs/core
team here.core team members can create a canary release here or locally with
gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=<PR_NUMBER>