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

[Tracking]: Test-Related Package Consolidation #30675

Open
4 of 39 tasks
valentinpalkovic opened this issue Feb 26, 2025 · 0 comments
Open
4 of 39 tasks

[Tracking]: Test-Related Package Consolidation #30675

valentinpalkovic opened this issue Feb 26, 2025 · 0 comments
Assignees
Labels
Milestone

Comments

@valentinpalkovic
Copy link
Contributor

valentinpalkovic commented Feb 26, 2025

This milestone aims to consolidate test-related packages into a unified @storybook/addon-test package. The goal is to simplify testing workflows and ensure all relevant test utilities are maintained under a single addon. The work requires package migrations, updates to CLI behavior, automigrations, and comprehensive documentation.

Items:

1. Promote @storybook/experimental-addon-test to stable @storybook/addon-test

  • Rename and restructure @storybook/experimental-addon-test as @storybook/addon-test
    • Update package.json metadata (name, version, description) in the package
    • Ensure stable API exposure for the new @storybook/addon-test package
    • Remove "experimental" labels and update all internal references in the codebase

2. Merge test-related packages into @storybook/addon-test

3. Update CLI to reflect new Test addon behavior

  • Modify the Storybook CLI to include @storybook/addon-test when "Testing" is selected for all new Storybook projects
    • Make sure that template stories use @storybook/addon-test

4. Rewrite post-install script to ask for Test Module usage

  • Rewrite post-install script to allow "addon-interactions" mode

5. Automigration & Documentation Updates

  • Write an automigration script to transition existing projects to the new addon
    • Automatically replace old imports (@storybook/test, @storybook/addon-actions, etc.) with @storybook/addon-test in user codebases
    • Remove now-redundant dependencies (@storybook/test, @storybook/addon-interactions, @storybook/addon-actions, @storybook/instrumenter, @storybook/experimental-addon-test) from users’ package.json
    • Verify that the automigration covers all common use cases and edge cases (run it against a sample of real projects if possible)
    • Automigration: Install @storybook/addon-test for the user if they had @storybook/addon-essentials
  • Update Addon Kit to use @storybook/addon-test
  • Update documentation & migration notes for Storybook 9
    • Provide a clear migration guide for users moving from Storybook 8.x to 9, highlighting the new @storybook/addon-test and the removal of the old packages
    • Document the new unified testing workflow and its benefits in the official docs (e.g., Guide for “Testing in Storybook 9”) (@jonniebigodes)
    • Update all relevant Storybook documentation sections (addons list, CLI docs, configuration guides) to reflect the consolidated test addon (@jonniebigodes)
  • Point @storybook/addon-test readme to official documentation
  • Remap /~https://github.com/storybookjs/storybook/blob/next/code/addons/test/src/vitest-plugin/index.ts#L298
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant