Skip to content

Build: Testing more e2e-dev instead of e2e build #32089

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

Open
wants to merge 7 commits into
base: next
Choose a base branch
from

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented Jul 21, 2025

Closes #31742

What I did

A long time ago we started to slowly skip or decide against using many e2e tests for Storybook dev. This PR attempts to revisit that decision.

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/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>

Greptile Summary

This PR makes a strategic change to the end-to-end testing strategy in Storybook by swapping the task names in the task map. The change effectively makes the development server the primary target for e2e tests while production builds become the secondary target. Specifically:

  • e2e-tests now maps to e2e-dev (previously mapped to production builds)
  • e2e-tests-dev now maps to e2e-production (previously mapped to dev builds)

This change is intended to increase test coverage of Storybook's development server environment, which is the primary way users interact with Storybook. The motivation comes from historical incidents where critical bugs in the dev server went undetected until release.

Confidence score: 4/5

  1. This PR is safe to merge as it's a straightforward task map change with clear intent
  2. The high confidence score is due to the simplicity of the change and its well-documented motivation
  3. Files needing attention:
    • scripts/get-template.ts: Verify that dependent CI workflows and documentation are updated to reflect the new task naming
    • scripts/tasks/e2e-tests-build.ts and scripts/tasks/e2e-tests-dev.ts: Ensure these files' implementations align with the new task mapping

@yannbf yannbf added build Internal-facing build tooling & test updates ci:merged Run the CI jobs that normally run when merged. labels Jul 21, 2025
Copy link

nx-cloud bot commented Jul 21, 2025

View your CI Pipeline Execution ↗ for commit b516634

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

☁️ Nx Cloud last updated this comment at 2025-07-24 15:44:09 UTC

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.

1 file reviewed, no comments

Edit Code Review Bot Settings | Greptile

@yannbf yannbf force-pushed the yann/increase-e2e-dev-coverage branch from 97ff2bc to 5c30f3f Compare July 21, 2025 12:43
@yannbf yannbf self-assigned this Jul 21, 2025
@yannbf yannbf force-pushed the yann/increase-e2e-dev-coverage branch from 5c30f3f to 3bfa1b2 Compare July 22, 2025 12:23
@storybook-pr-benchmarking
Copy link

storybook-pr-benchmarking bot commented Jul 22, 2025

Package Benchmarks

Commit: b516634, ran on 24 July 2025 at 15:26:53 UTC

The following packages have significant changes to their size or dependencies:

storybook

Before After Difference
Dependency count 56 56 0
Self size 41.35 MB 41.37 MB 🚨 +16 KB 🚨
Dependency size 18.22 MB 18.22 MB 🚨 +2 B 🚨
Bundle Size Analyzer Link Link

sb

Before After Difference
Dependency count 57 57 0
Self size 1 KB 1 KB 🚨 +2 B 🚨
Dependency size 59.57 MB 59.59 MB 🚨 +16 KB 🚨
Bundle Size Analyzer Link Link

@storybook/cli

Before After Difference
Dependency count 221 221 0
Self size 585 KB 585 KB 🎉 -115 B 🎉
Dependency size 103.98 MB 103.99 MB 🚨 +16 KB 🚨
Bundle Size Analyzer Link Link

@storybook/codemod

Before After Difference
Dependency count 190 190 0
Self size 31 KB 31 KB 🚨 +2 B 🚨
Dependency size 88.07 MB 88.08 MB 🚨 +16 KB 🚨
Bundle Size Analyzer Link Link

@yannbf yannbf added ci:daily Run the CI jobs that normally run in the daily job. and removed ci:merged Run the CI jobs that normally run when merged. ci:daily Run the CI jobs that normally run in the daily job. labels Jul 23, 2025
@yannbf yannbf added ci:normal and removed ci:daily Run the CI jobs that normally run in the daily job. labels Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Internal-facing build tooling & test updates ci:normal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve dev-server test coverage
1 participant