Skip to content

test: Migrate identity multichain E2E coverage to CV#30107

Merged
racitores merged 12 commits into
mainfrom
raci/cvtest-vs-e2e-identity-multichain
May 20, 2026
Merged

test: Migrate identity multichain E2E coverage to CV#30107
racitores merged 12 commits into
mainfrom
raci/cvtest-vs-e2e-identity-multichain

Conversation

@racitores

@racitores racitores commented May 13, 2026

Copy link
Copy Markdown
Contributor

Description

Summary

Migrates selected Identity + Multichain Accounts coverage from E2E toward Component View tests for the E2E -> CV effort.

This PR adds shared CV identity and multichain-account presets/renderers, plus route-probe and controller mock support, then adds CV coverage for:

  • Backup & Sync account/contact sync settings toggles
  • Contacts list/form behavior: opening the add form, editing an existing contact, duplicate-address validation, saving a valid contact through AddressBookController, and opening the network selector
  • Multichain account selector behavior: account creation per SRP section, account selection, external-address search/selection, invalid-address handling, keyboard toggling, search filtering/empty state, and multi-SRP display
  • Account group details behavior: account rename/edit validation, route wiring to address list/private keys/account actions, and multi-SRP details display
  • Multichain accounts intro and learn-more modal navigation
  • Multichain permissions summary actions/state
  • Private key list password, reveal, and copy behavior
  • Delete account sheet behavior: imported account delete confirmation, cancel, failure handling, and HD-account non-removal guard

E2E removal

Removes:

  • tests/smoke/multichain-accounts/account-details.spec.ts

Rationale: the active Account Details rename behavior from that smoke spec is now covered directly at the CV layer through route wiring, validation, and controller interaction.

Changelog

CHANGELOG entry: null

Related issues

Fixes: MMQA-1723

Manual testing steps

Feature: Identity + Multichain Accounts CV migration

  Scenario: verify migrated CV coverage
    Given the Identity + Multichain Accounts CV migration branch is checked out

    When yarn jest -c jest.config.view.js app/components/Views/Settings/Identity/BackupAndSyncSettings.view.test.tsx app/components/Views/Settings/Contacts/Contacts.view.test.tsx app/component-library/components-temp/MultichainAccounts/MultichainAccountSelectorList/MultichainAccountSelectorList.view.test.tsx app/components/Views/MultichainAccounts/AccountGroupDetails/AccountGroupDetails.view.test.tsx app/components/Views/MultichainAccounts/sheets/DeleteAccount/DeleteAccount.view.test.tsx app/components/Views/MultichainAccounts/IntroModal/MultichainAccountsIntroModal.view.test.tsx app/components/Views/MultichainAccounts/PrivateKeyList/PrivateKeyList.view.test.tsx app/components/Views/MultichainAccounts/MultichainPermissionsSummary/MultichainPermissionsSummary.view.test.tsx --runInBand --silent --coverage=false is run
    Then all 8 CV suites pass with 70 tests passing

Validation performed locally:

  • yarn jest -c jest.config.view.js app/components/Views/Settings/Identity/BackupAndSyncSettings.view.test.tsx app/components/Views/Settings/Contacts/Contacts.view.test.tsx app/component-library/components-temp/MultichainAccounts/MultichainAccountSelectorList/MultichainAccountSelectorList.view.test.tsx app/components/Views/MultichainAccounts/AccountGroupDetails/AccountGroupDetails.view.test.tsx app/components/Views/MultichainAccounts/sheets/DeleteAccount/DeleteAccount.view.test.tsx app/components/Views/MultichainAccounts/IntroModal/MultichainAccountsIntroModal.view.test.tsx app/components/Views/MultichainAccounts/PrivateKeyList/PrivateKeyList.view.test.tsx app/components/Views/MultichainAccounts/MultichainPermissionsSummary/MultichainPermissionsSummary.view.test.tsx --runInBand --silent --coverage=false - PASS, 8 suites / 70 tests

Screenshots/Recordings

Before

N/A - test-only migration.

After

N/A - test-only migration.

Pre-merge author checklist

Performance checks (if applicable)

  • I've tested on Android
  • I've tested with a power user scenario
  • I've instrumented key operations with Sentry traces for production performance metrics

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
Low risk: changes are confined to test code and test utilities (mocks/fixtures/render helpers), with no production behavior changes beyond how tests execute.

Overview
Adds new Component View test suites covering Identity (Backup & Sync toggles, Contacts list/form flows) and Multichain Accounts (account selector, account group details, intro/learn-more modals, permissions summary, private key list, and delete-account sheet behaviors).

Introduces shared CV infrastructure to support these suites: richer Engine controller mocks, new identity/multichainAccounts state presets and renderers, and route/route-params probe helpers in tests/component-view/render.tsx for asserting navigation without mocking.

Removes the legacy multichain account details smoke spec (tests/smoke/multichain-accounts/account-details.spec.ts) now covered by the new CV tests.

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

@metamaskbotv2 metamaskbotv2 Bot added the team-qa QA team label May 13, 2026
@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 May 13, 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.

@racitores racitores marked this pull request as ready for review May 15, 2026 08:24
@racitores racitores requested review from a team as code owners May 15, 2026 08:24

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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 dbf0d13. Configure here.

Comment thread tests/component-view/renderers/multichainAccounts.tsx Outdated
@racitores racitores changed the title Migrate identity multichain E2E coverage to CV test: Migrate identity multichain E2E coverage to CV May 18, 2026
vinnyhoward
vinnyhoward previously approved these changes May 18, 2026
@racitores racitores 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 May 19, 2026
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.01%. Comparing base (3751d9a) to head (0d77cd3).
⚠️ Report is 373 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #30107      +/-   ##
==========================================
+ Coverage   81.54%   82.01%   +0.47%     
==========================================
  Files        5343     5440      +97     
  Lines      142128   145312    +3184     
  Branches    32411    33253     +842     
==========================================
+ Hits       115899   119184    +3285     
+ Misses      18299    17990     -309     
- Partials     7930     8138     +208     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@racitores

Copy link
Copy Markdown
Contributor Author

@metamaskbot update-mobile-fixture

@github-actions

Copy link
Copy Markdown
Contributor

🔄 Fixture update started. Running workflow from branch raci/cvtest-vs-e2e-identity-multichain. View workflow runs

@github-actions

Copy link
Copy Markdown
Contributor

E2E fixture update failed.\n\nCommon causes:\n- CI workflow is still running — wait for 'Build iOS Apps' to complete\n- CI workflow was skipped — ensure your PR has iOS-impacting changes or use skip-smart-e2e-selection label\n- iOS build failed — check the CI workflow for errors\n\nView logs and retry

1 similar comment
@github-actions

Copy link
Copy Markdown
Contributor

E2E fixture update failed.\n\nCommon causes:\n- CI workflow is still running — wait for 'Build iOS Apps' to complete\n- CI workflow was skipped — ensure your PR has iOS-impacting changes or use skip-smart-e2e-selection label\n- iOS build failed — check the CI workflow for errors\n\nView logs and retry

@github-actions

Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeWalletPlatform, SmokeAccounts, SmokeIdentity
  • Selected Performance tags: None (no tests recommended)
  • Risk Level: low
  • AI Confidence: 82%
click to see 🤖 AI reasoning details

E2E Test Selection:
All 15 changed files are test infrastructure and unit tests only — no production app code was modified. The changes introduce:

  1. Component view test infrastructure (tests/component-view/): New presets, renderers, and utilities for multichain accounts and identity features. These are Jest-based component view tests, not Detox E2E tests.

  2. New unit test files for MultichainAccounts views (AccountGroupDetails, IntroModal, PermissionsSummary, PrivateKeyList, DeleteAccount) and Identity views (BackupAndSyncSettings, Contacts).

  3. tests/smoke/multichain-accounts/account-details.spec.ts was listed as a changed file but not found on disk — it may be a new E2E spec being added. The existing delete-account.spec.ts in the same directory uses SmokeWalletPlatform.

Tag selection rationale:

  • SmokeWalletPlatform: The existing E2E test tests/smoke/multichain-accounts/delete-account.spec.ts uses this tag and covers multichain account deletion flows. The new account-details.spec.ts (if it exists) would also likely use this tag. Running this validates the multichain accounts E2E infrastructure still works.
  • SmokeAccounts: The changes touch account management flows (account deletion, renaming, private key export, account selector) which are core account management features. Per tag description, multi-account workflows and account management are covered here.
  • SmokeIdentity: The identity preset and renderer cover BackupAndSync settings and contact syncing — directly related to Profile Sync Controller and identity sync features.

No production code changes means risk of breaking existing E2E tests is low. Performance tests are not warranted as no UI rendering, data loading, or app startup code was modified.

Performance Test Selection:
All changes are test infrastructure (Jest component view tests, presets, renderers, utilities) with no production app code modifications. No UI rendering performance, data loading, state management, or app startup code was changed, so performance tests are not warranted.

View GitHub Actions results

@sonarqubecloud

Copy link
Copy Markdown

@racitores racitores added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label May 20, 2026
@racitores racitores added this pull request to the merge queue May 20, 2026
Merged via the queue into main with commit 3749f90 May 20, 2026
153 of 172 checks passed
@racitores racitores deleted the raci/cvtest-vs-e2e-identity-multichain branch May 20, 2026 15:14
@github-actions github-actions Bot locked and limited conversation to collaborators May 20, 2026
@metamaskbotv2 metamaskbotv2 Bot added the release-7.79.0 Issue or pull request that will be included in release 7.79.0 label May 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-7.79.0 Issue or pull request that will be included in release 7.79.0 size-XL team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants