chore: reset 58 unrelated test changes to match main#29532
chore: reset 58 unrelated test changes to match main#29532andrepimenta wants to merge 1 commit intorn-upgrade/0.81.5-no-unit-testsfrom
Conversation
Resets test files whose diffs versus main are not part of the React Native 0.81.5 upgrade (feature work, unrelated refactors, removed/renamed tests, mocks that no longer match production types). Categorisation lives in `.metamask/audit_tests_changes.md`. Breakdown: - 54 modified test files restored to main (URL-constant inlining, selector renames that don't match production, removed/renamed tests, property renames such as account_type -> flow_type, broken Skeleton mock paths, stripped mock fields the production type still requires, buildMessengerClientInitRequestMock -> buildControllerInitRequestMock rename across the 9 controller-init tests + test-utils.ts even though app/core/Engine/types.ts still exports getMessengerClient, etc.). - 1 deleted test restored: app/util/identity/hooks/useBrazeIdentity/useBrazeIdentity.test.ts - 3 added-on-branch tests removed: - app/components/UI/Rewards/components/Onboarding/RewardsIntroModal.test.tsx - app/selectors/featureFlagController/legalNotices/index.test.ts - app/selectors/featureFlagController/tokenDetailsV2/index.test.ts The 10 'Keep' files (the 5 RN-driven snapshot regenerations, testSetup.js / testSetupView.js mock plumbing, initial-background-state.json marketOverview cleanup, tests/component-view/mocks.ts Easing reshape, and tests/page-objects/wallet/AccountListBottomSheet.ts E2E flake fix) are left untouched.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7a420ca. Configure here.
| import React from 'react'; | ||
| import renderWithProvider from '../../../../../util/test/renderWithProvider'; | ||
| import networkImage from '../../../../../images/ethereum.png'; | ||
| import networkImage from '../../../../images/ethereum.png'; |
There was a problem hiding this comment.
Wrong relative import path for ethereum.png image
High Severity
The import path ../../../../images/ethereum.png resolves to app/features/images/ethereum.png, which does not contain ethereum.png. The file exists at app/images/ethereum.png. The original path with five ../ segments was correct; removing one level breaks the import and will cause the test to fail at build/runtime.
Reviewed by Cursor Bugbot for commit 7a420ca. Configure here.
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection: Key changes analyzed:
Since no production code is modified, E2E tests cannot be broken by these changes. Running E2E tests would not validate anything specific to these test-only changes. No performance tests are needed either as no UI rendering, data loading, or app initialization code was modified. Performance Test Selection: |


Resets test files whose diffs versus main are not part of the React Native 0.81.5 upgrade (feature work, unrelated refactors, removed/renamed tests, mocks that no longer match production types). Categorisation lives in
.metamask/audit_tests_changes.md.Breakdown:
The 10 'Keep' files (the 5 RN-driven snapshot regenerations, testSetup.js / testSetupView.js mock plumbing, initial-background-state.json marketOverview cleanup, tests/component-view/mocks.ts Easing reshape, and tests/page-objects/wallet/AccountListBottomSheet.ts E2E flake fix) are left untouched.
Description
Changelog
CHANGELOG entry:
Related issues
Fixes:
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Low Risk
Test-only changes plus test utilities/mocks updates; low product risk, with main risk being missed regressions if restored expectations no longer reflect runtime behavior.
Overview
Aligns numerous unit tests and mocks back to current
mainexpectations, including updated selectors/feature-flag wiring, navigation params, and stable URL usage via shared constants.Updates multiple test doubles to match production interfaces (e.g., Earn adds
tron_staking, Perps addsdiskCacheand streamgetSnapshot/prewarmmethods, Engine controller init tests switch tobuildMessengerClientInitRequestMock/getMessengerClient) and refreshes assertions/snapshots around analytics properties (e.g., Home viewedapp_session_id/visit_number, rampsasset_symbol, wallet-creation error CTAs) and UI header behavior (SimpleWebview).Removes a handful of branch-only tests and obsolete feature-flag gating assertions (e.g., PNA25 flag checks), and adjusts/extends tests around QR hardware marketing suppression, tooltip dismissal behavior, and app-state open tracking edge cases.
Reviewed by Cursor Bugbot for commit 7a420ca. Bugbot is set up for automated code reviews on this repo. Configure here.