Skip to content
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

CLI: Fix test install in RNW projects #30786

Merged
merged 2 commits into from
Mar 11, 2025
Merged

Conversation

shilman
Copy link
Member

@shilman shilman commented Mar 10, 2025

Closes N/A

What I did

Currently the CLI does not install testing functionality in RNW projects. This fixes it.

Checklist for Contributors

Testing

Manual testing

pnpm create expo empty-expo
cd empty-expo
pnpm create storybook 
  1. Select all the features (default selection)
  2. Select RNW

This will skep testing in storybook@latest but will install it in this updated version.

🦋 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>

Greptile Summary

Added React Native Web (RNW) to the list of supported frameworks for test addon installation in the Storybook CLI, enabling test functionality to be included during initialization of RNW projects.

  • Added ProjectType.REACT_NATIVE_WEB to supportedFrameworks array in code/lib/create-storybook/src/generators/baseGenerator.ts
  • Ensures test addon is installed when initializing Storybook in RNW projects
  • Fixes current behavior where testing functionality was being skipped for RNW

@shilman shilman added bug cli react-native-web patch:yes Bugfix & documentation PR that need to be picked to main branch ci:normal labels Mar 10, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link

nx-cloud bot commented Mar 10, 2025

View your CI Pipeline Execution ↗ for commit bb2ad1a.

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 1m 57s View ↗

☁️ Nx Cloud last updated this comment at 2025-03-10 16:24:17 UTC

@shilman
Copy link
Member Author

shilman commented Mar 11, 2025

Self-merging @ghengeveld

@shilman shilman merged commit 2b407ae into next Mar 11, 2025
52 of 56 checks passed
@shilman shilman deleted the shilman/fix-rnw-test-install branch March 11, 2025 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug ci:normal cli patch:yes Bugfix & documentation PR that need to be picked to main branch react-native-web
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant