Skip to content

Conversation

@christopherferreira9
Copy link
Contributor

@christopherferreira9 christopherferreira9 commented Jan 8, 2026

Description

This PR aims to refactor test ID definitions to follow proper architectural guidelines by moving them from e2e/selectors/ into the application code. App code was importing test IDs from the e2e/ folder, creating an incorrect dependency where production code depends on test infrastructure. This moves test ID definitions to app/ code as *.testIds.ts files, co-located with their respective components. E2E page objects now import test IDs from app code instead of vice versa.

Changes

  • Created *.testIds.ts files in app/ alongside their components
  • Updated all app/ imports to use local testIds files
  • Updated e2e/ page object imports to reference new app locations
  • No logic changes - only file organization and import paths
  • Existing selectors under e2e/ are test related files and are not imported in app/

Example

Before

// app/component-library/components/Cells/Cell/Cell.tsx
import { CellComponentSelectorsIDs } from '../../../../../e2e/selectors/wallet/CellComponent.selectors';

After

// app/component-library/components/Cells/Cell/Cell.tsx
import { CellComponentSelectorsIDs } from './CellComponent.testIds';

Notes

  • Duplicate selector files remain in e2e/selectors/ for wdio compatibility (wdio deprecation planned)
  • E2e-only selectors (test dapp, snaps, etc.) intentionally remain in e2e/selectors/

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

Moves test selector definitions into app code and redirects imports away from e2e/.

  • Adds co-located *.testIds.ts files across components (e.g., Cells, Toast, Network, Perps, Predict, Card, Wallet, Bridge, Browser, Modals) and points app/tests to them
  • Replaces imports from e2e/selectors/* with local *.testIds paths; leaves e2e files for backward compatibility
  • Minor adjustments: some constants typed as const, locale import path fixes, and a small text key update (delete_myerase_my)

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

@christopherferreira9 christopherferreira9 added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Jan 8, 2026
@christopherferreira9 christopherferreira9 requested review from a team as code owners January 8, 2026 12:09
@github-actions
Copy link
Contributor

github-actions bot commented Jan 8, 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.

@metamaskbot metamaskbot added the team-qa QA team label Jan 8, 2026
@christopherferreira9 christopherferreira9 marked this pull request as draft January 8, 2026 12:09
@jvbriones jvbriones marked this pull request as ready for review January 8, 2026 12:28
@jvbriones jvbriones marked this pull request as draft January 8, 2026 12:29
@christopherferreira9 christopherferreira9 marked this pull request as ready for review January 8, 2026 13:22
@christopherferreira9 christopherferreira9 requested a review from a team as a code owner January 8, 2026 13:22
@christopherferreira9 christopherferreira9 force-pushed the cferreira/fix-selectors-location branch from 399815e to 2060c3f Compare January 8, 2026 17:40
@jvbriones jvbriones added the skip-e2e-quality-gate Skips the E2E Quality gate (flakiness detection) label Jan 9, 2026
@jvbriones jvbriones added the skip-smart-e2e-selection Skip Smart E2E selection, i.e. select all E2E tests to run label Jan 9, 2026
@christopherferreira9 christopherferreira9 force-pushed the cferreira/fix-selectors-location branch from cee0d6b to 8221eed Compare January 10, 2026 14:55
@github-actions
Copy link
Contributor

🔍 Smart E2E Test Selection

⏭️ Smart E2E selection skipped - skip-smart-e2e-selection label found

All E2E tests pre-selected.

View GitHub Actions results

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed size-XL skip-e2e-quality-gate Skips the E2E Quality gate (flakiness detection) skip-smart-e2e-selection Skip Smart E2E selection, i.e. select all E2E tests to run team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants