Skip to content

test: moves hardcoded testIds into dedicated files - accounts#27141

Merged
christopherferreira9 merged 8 commits into
mainfrom
cferreira/audit-hardcoded-test-ids
Mar 11, 2026
Merged

test: moves hardcoded testIds into dedicated files - accounts#27141
christopherferreira9 merged 8 commits into
mainfrom
cferreira/audit-hardcoded-test-ids

Conversation

@christopherferreira9
Copy link
Copy Markdown
Contributor

@christopherferreira9 christopherferreira9 commented Mar 6, 2026

Description

This PR moves hardcoded strings into dedicated *.testIds.ts files so they can be used through the multiple test parts to avoid duplication.

Changelog

CHANGELOG entry:

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

Screenshots/Recordings

Before

After

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
Low risk refactor that only replaces hardcoded testID strings with exported constants; main risk is breaking E2E/unit selectors if any IDs changed (they appear unchanged).

Overview
Moves several hardcoded React Native testID strings into new dedicated *.testIds.ts modules and updates components to reference these constants.

This standardizes selectors for multichain account list cells (AccountListCell, ExternalAccountCell), Backup & Sync toggles (BackupAndSyncToggle, BackupAndSyncFeaturesToggles), and Smart Account UI (SmartAccountModal, SmartAccountNetworkList, LearnMoreBottomSheet) without changing UI behavior.

Written by Cursor Bugbot for commit fdbbda0. This will update automatically on new commits. Configure here.

@christopherferreira9 christopherferreira9 requested a review from a team as a code owner March 6, 2026 16:47
@christopherferreira9 christopherferreira9 added team-qa QA team no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed labels Mar 6, 2026
@christopherferreira9 christopherferreira9 marked this pull request as draft March 6, 2026 16:47
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 6, 2026

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 size-S label Mar 6, 2026
@christopherferreira9 christopherferreira9 changed the title test: updates testIds test: moves hardcoded testIds into dedicated files - accounts Mar 6, 2026
@christopherferreira9 christopherferreira9 marked this pull request as ready for review March 6, 2026 17:13
Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

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 2 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

Comment thread app/components/UI/Identity/BackupAndSyncToggle/BackupAndSyncToggle.testIds.ts Outdated
@github-actions
Copy link
Copy Markdown
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeIdentity, SmokeWalletPlatform, SmokeNetworkExpansion, SmokeNetworkAbstractions
  • Selected Performance tags: @PerformanceAccountList
  • Risk Level: high
  • AI Confidence: 80%
click to see 🤖 AI reasoning details

E2E Test Selection:
The changes are concentrated in Multichain Account UI components and Identity backup/sync toggles:

  • MultichainAccountSelectorList (AccountListCell, ExternalAccountCell) directly affects account selection and multi-account management flows → impacts SmokeAccounts.
  • SmartAccountModal and SmartAccountNetworkList affect smart/multichain account details and per-network handling → impacts multi-chain provider behavior and account switching flows → SmokeNetworkExpansion and SmokeNetworkAbstractions.
  • BackupAndSyncToggle and BackupAndSyncFeaturesToggles directly affect account sync and backup settings → impacts SmokeIdentity. Per tag rules, when touching account sync or multi-SRP flows, also select SmokeAccounts and SmokeWalletPlatform.
  • Multichain account architecture and account hierarchy presentation affect core wallet platform behavior (multi-SRP, account switching, provider events) → SmokeWalletPlatform.

These components are central to account selection, sync, and multi-chain handling, which are high-risk shared surfaces used across many E2E flows (navigation, dApp connections, transactions). Therefore, a high risk level is appropriate.

No direct changes to confirmations, swaps, perps, predictions, ramps, card, or snaps were observed, and no controller/Engine-level logic was modified.

Performance Test Selection:
Changes to AccountListCell and ExternalAccountCell directly affect account list rendering and account selector behavior. This can impact rendering performance, especially in multi-account scenarios. Therefore, Account List performance tests should run. No evidence of onboarding, launch, swap, or asset-loading performance impact.

View GitHub Actions results

@github-actions
Copy link
Copy Markdown
Contributor

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

@sonarqubecloud
Copy link
Copy Markdown

@christopherferreira9 christopherferreira9 added this pull request to the merge queue Mar 11, 2026
Merged via the queue into main with commit d34949e Mar 11, 2026
99 checks passed
@christopherferreira9 christopherferreira9 deleted the cferreira/audit-hardcoded-test-ids branch March 11, 2026 15:15
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 11, 2026
@metamaskbot metamaskbot added the release-7.70.0 Issue or pull request that will be included in release 7.70.0 label Mar 11, 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.70.0 Issue or pull request that will be included in release 7.70.0 size-S team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants