Skip to content

chore: drop unused env flags#28104

Merged
grvgoel81 merged 3 commits into
mainfrom
chore/simplify-e2e-mock-flags
Mar 30, 2026
Merged

chore: drop unused env flags#28104
grvgoel81 merged 3 commits into
mainfrom
chore/simplify-e2e-mock-flags

Conversation

@grvgoel81

@grvgoel81 grvgoel81 commented Mar 30, 2026

Copy link
Copy Markdown
Contributor

Description

  • Simplify Metro OAuth module mocks use one variable, isE2E or E2E_MOCK_OAUTH=true at bundle time.
  • Removes unused Metro env flags.

Changelog

CHANGELOG entry: null

Related issues

Fixes:

Manual testing steps

Feature: Metro OAuth mocks for E2E/perf bundles

 Scenario: Production bundle without E2E mock flags
    Given Metro runs with IS_TEST not "true", METAMASK_ENVIRONMENT not "e2e", and E2E_MOCK_OAUTH not "true"
    When the app bundle is produced
    Then seedless-onboarding-controller and OAuthLoginHandlers resolve to real modules 
 
 Scenario: E2E bundle
    Given Metro runs with IS_TEST="true" or METAMASK_ENVIRONMENT="e2e"
    When the app bundle is produced
    Then seedless-onboarding-controller and OAuthLoginHandlers can resolve to tests/module-mocking implementations

Screenshots/Recordings

Before

After

Screenshot 2026-03-31 at 12 03 06 AM Screenshot 2026-03-31 at 12 03 28 AM

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

Medium Risk
Touches Metro module resolution logic used during bundling; misconfigured env vars could unintentionally enable or disable seedless/OAuth mocks for test/perf builds.

Overview
Simplifies E2E Metro module mocks configuration. Metro now enables both seedless-onboarding-controller and OAuthLoginHandlers redirects whenever standard E2E detection (IS_TEST/METAMASK_ENVIRONMENT=e2e) is true, or when E2E_MOCK_OAUTH=true is set at bundle time.

Removes the previously supported fine-grained env toggles (and their documentation comments) in favor of the single override, and updates Appwright onboarding perf project comments accordingly.

Written by Cursor Bugbot for commit bbfb854. Configure here.

@grvgoel81 grvgoel81 self-assigned this Mar 30, 2026
@github-actions

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.

@metamaskbot metamaskbot added the team-onboarding Onboarding team label Mar 30, 2026
@github-actions github-actions Bot added size-M and removed size-S labels Mar 30, 2026
@grvgoel81 grvgoel81 marked this pull request as ready for review March 30, 2026 18:48
@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - draft PR

All E2E tests pre-selected.

View GitHub Actions results

@christopherferreira9 christopherferreira9 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@sonarqubecloud

Copy link
Copy Markdown

@grvgoel81 grvgoel81 enabled auto-merge March 30, 2026 19:30
@github-actions

Copy link
Copy Markdown
Contributor

E2E Fixture Validation — Schema is up to date
17 value mismatches detected (expected — fixture represents an existing user).
View details

@grvgoel81 grvgoel81 added this pull request to the merge queue Mar 30, 2026
Merged via the queue into main with commit 3cb90d4 Mar 30, 2026
110 checks passed
@grvgoel81 grvgoel81 deleted the chore/simplify-e2e-mock-flags branch March 30, 2026 20:44
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 30, 2026
@metamaskbot metamaskbot added the release-7.73.0 Issue or pull request that will be included in release 7.73.0 label Mar 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.73.0 Issue or pull request that will be included in release 7.73.0 size-M team-onboarding Onboarding team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants