Skip to content

Build: Fix react native expo e2e tests#32240

Merged
yannbf merged 1 commit into
nextfrom
yann/fix-e2e-tests
Aug 11, 2025
Merged

Build: Fix react native expo e2e tests#32240
yannbf merged 1 commit into
nextfrom
yann/fix-e2e-tests

Conversation

@yannbf
Copy link
Copy Markdown
Member

@yannbf yannbf commented Aug 11, 2025

Closes #

What I did

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 fixes end-to-end test failures for the React Native Expo template by making two targeted changes. The first change improves the robustness of the isReactSandbox utility function by refactoring it to use explicit null checking and optional chaining, preventing runtime errors when template lookups fail. The second change modifies the React Native Expo sandbox template creation script to establish the expected directory structure by moving the default app directory into src/app after project creation.

These changes address infrastructure issues in the testing pipeline where the e2e tests expected a specific project structure that wasn't being created by the default create-expo-app command. The utility function improvement adds defensive programming practices that make the template lookup more resilient to edge cases. Both changes are focused on internal testing infrastructure and don't affect user-facing functionality.

PR Description Notes:

  • The PR description is missing details about what was actually done - the "What I did" section is empty
  • No manual testing steps are provided despite the checklist requirement
  • No automated test coverage is indicated

Confidence score: 4/5

  • This PR is safe to merge with low risk of production issues
  • Score reflects solid defensive programming improvements and targeted test infrastructure fixes
  • Pay attention to the React Native Expo template configuration and utility function error handling

@yannbf yannbf self-assigned this Aug 11, 2025
@yannbf yannbf added build Internal-facing build tooling & test updates ci:daily Run the CI jobs that normally run in the daily job. labels Aug 11, 2025
Copy link
Copy Markdown
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.

2 files reviewed, no comments

Edit Code Review Bot Settings | Greptile

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Aug 11, 2025

View your CI Pipeline Execution ↗ for commit 8023f88

Command Status Duration Result
nx run-many -t check -c production --parallel=7 ✅ Succeeded 1s View ↗
nx run-many -t build -c production --parallel=3 ✅ Succeeded 2s View ↗

☁️ Nx Cloud last updated this comment at 2025-08-11 16:36:56 UTC

@yannbf yannbf force-pushed the yann/fix-e2e-tests branch from b5c34f2 to 8023f88 Compare August 11, 2025 16:12
@yannbf yannbf added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Aug 11, 2025
@storybook-app-bot
Copy link
Copy Markdown

Package Benchmarks

Commit: 8023f88, ran on 11 August 2025 at 16:27:45 UTC

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

storybook

Before After Difference
Dependency count 51 51 0
Self size 41.74 MB 41.75 MB 🚨 +15 KB 🚨
Dependency size 18.13 MB 18.13 MB 0 B
Bundle Size Analyzer Link Link

sb

Before After Difference
Dependency count 52 52 0
Self size 1 KB 1 KB 0 B
Dependency size 59.87 MB 59.89 MB 🚨 +15 KB 🚨
Bundle Size Analyzer Link Link

@storybook/cli

Before After Difference
Dependency count 220 220 0
Self size 585 KB 585 KB 🚨 +24 B 🚨
Dependency size 104.37 MB 104.39 MB 🚨 +15 KB 🚨
Bundle Size Analyzer Link Link

@storybook/codemod

Before After Difference
Dependency count 189 189 0
Self size 31 KB 31 KB 0 B
Dependency size 88.45 MB 88.46 MB 🚨 +15 KB 🚨
Bundle Size Analyzer Link Link

@yannbf yannbf merged commit 383baef into next Aug 11, 2025
95 checks passed
@yannbf yannbf deleted the yann/fix-e2e-tests branch August 11, 2025 16:46
yannbf added a commit that referenced this pull request Aug 11, 2025
Build: Fix react native expo e2e tests
(cherry picked from commit 383baef)
@github-actions github-actions Bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Aug 11, 2025
@ndelangen ndelangen removed the patch:yes Bugfix & documentation PR that need to be picked to main branch label Oct 28, 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:daily Run the CI jobs that normally run in the daily job. patch:done Patch/release PRs already cherry-picked to main/release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants