Skip to content

fix(e2e): import test IDs directly to fix E2E parse failure#30950

Merged
cmd-ob merged 2 commits into
mainfrom
fix/e2e-existing-user-sheet-import
Jun 2, 2026
Merged

fix(e2e): import test IDs directly to fix E2E parse failure#30950
cmd-ob merged 2 commits into
mainfrom
fix/e2e-existing-user-sheet-import

Conversation

@cmd-ob

@cmd-ob cmd-ob commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Description

PR #30917 imported ExistingUserSheetSelectorsIDs from the barrel index.ts in wallet.flow.ts. That barrel re-exports the full ExistingUserSheet React component, which transitively pulls in BottomSheet@react-navigation/nativereact-native/index.js. The RN index file uses Flow-style import typeof syntax that Jest in the Detox E2E runner can't parse, causing every E2E test that imports wallet.flow.ts to fail with SyntaxError: Cannot use import statement outside a module.

Fix: import ExistingUserSheetSelectorsIDs directly from ExistingUserSheet.testIds.ts instead of the barrel export.

Changelog

CHANGELOG entry: null

Related issues

Fixes: E2E failures introduced by #30917

Manual testing steps

```gherkin
Feature: E2E smoke tests pass

Scenario: E2E tests can parse wallet.flow.ts imports
Given the E2E test suite runs in CI

When any smoke test imports wallet.flow.ts
Then the test suite should not fail with a SyntaxError

```

Screenshots/Recordings

N/A — CI-only fix, no UI changes.

Before

All E2E smoke tests fail with:
```
SyntaxError: Cannot use import statement outside a module
at node_modules/react-native/index.js:27
```

After

E2E smoke tests parse successfully and run as expected.

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Low Risk
Single import-path change in E2E helpers; no app runtime or security behavior changes.

Overview
wallet.flow.ts now imports ExistingUserSheetSelectorsIDs from ExistingUserSheet.testIds.ts instead of the ExistingUserSheet barrel. That avoids pulling the full sheet component (and react-native via navigation/bottom sheet) into the Detox/Jest graph, which was breaking module parsing for every test that imports this flow.

Reviewed by Cursor Bugbot for commit 6d9709a. Bugbot is set up for automated code reviews on this repo. Configure here.

…ctly

The barrel export pulls in the full React component which triggers
Jest parse failures on react-native Flow syntax in the E2E runner.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cmd-ob cmd-ob requested a review from a team as a code owner June 2, 2026 16:16
@github-actions

github-actions Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@github-actions github-actions Bot added the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label Jun 2, 2026
@mm-token-exchange-service mm-token-exchange-service Bot added the team-qa QA team label Jun 2, 2026
@cmd-ob cmd-ob removed the pr-not-ready-for-e2e Skip E2E and block merging. Remove this label once the PR is ready to run the E2E tests. label Jun 2, 2026
@cmd-ob cmd-ob enabled auto-merge June 2, 2026 16:20
@cmd-ob cmd-ob added the skip-e2e skip E2E test jobs label Jun 2, 2026
@cmd-ob cmd-ob added this pull request to the merge queue Jun 2, 2026
Merged via the queue into main with commit df4fe31 Jun 2, 2026
152 of 156 checks passed
@cmd-ob cmd-ob deleted the fix/e2e-existing-user-sheet-import branch June 2, 2026 17:55
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 2, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.81.0 Issue or pull request that will be included in release 7.81.0 label Jun 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.81.0 Issue or pull request that will be included in release 7.81.0 size-XS skip-e2e skip E2E test jobs team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants