metamask-mobile icon indicating copy to clipboard operation
metamask-mobile copied to clipboard

fix: perf test perps

Open racitores opened this issue 2 weeks ago • 3 comments

Description

Fix perps performance e2e tests

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.

racitores avatar Dec 10 '25 11:12 racitores

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[bot] avatar Dec 10 '25 11:12 github-actions[bot]

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 78.93%. Comparing base (3d81cde) to head (1d749db). :warning: Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #23863      +/-   ##
==========================================
- Coverage   78.93%   78.93%   -0.01%     
==========================================
  Files        4055     4055              
  Lines      106459   106459              
  Branches    21522    21522              
==========================================
- Hits        84032    84029       -3     
- Misses      16557    16563       +6     
+ Partials     5870     5867       -3     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov-commenter avatar Dec 11 '25 11:12 codecov-commenter

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokePerps
  • Risk Level: low
  • AI Confidence: 85%
click to see 🤖 AI reasoning details

The changes in this PR are primarily focused on E2E test infrastructure improvements, not product code:

  1. BrowserStackConfigBuilder.ts (CRITICAL flag): Adds geoLocation: 'FR' to BrowserStack capabilities. While this is in a critical path for E2E testing, it's a simple configuration addition that sets the test execution geolocation to France. This doesn't change test logic and is a minimal risk change.

  2. Perps Screen Objects: All the new and modified screen objects (PerpsClosePositionView, PerpsDepositScreen, PerpsMarketDetailsView, PerpsOrderView, PerpsPositionDetailsView, PerpsPositionsView, PerpsMarketListView, PerpsTabView) are wdio screen objects used for Perps feature testing. These are test helpers, not product code.

  3. Performance Tests: New performance test specs for Perps (perps-add-funds.spec.js, perps-position-management.spec.js) and deletion of perps-onboarding.spec.js. These are in the appwright/tests/performance/ directory, which are performance measurement tests.

  4. BridgeScreen.js: Refactored to reuse AmountScreen's enterAmount method instead of duplicating the digit-tapping logic. This is code cleanup in test infrastructure.

  5. Flows.js: Added selectAccountDevice helper for device-based account selection in performance tests. Used by the new perps-position-management.spec.js.

  6. TimersHelper.js: Removed unused withTimer static method - confirmed no other code uses it.

Since all changes are to test infrastructure (screen objects, test helpers, performance tests, and BrowserStack config), and the primary feature being tested is Perps, I recommend running SmokePerps tag to validate the Perps-related test changes work correctly. The BridgeScreen refactoring is minimal and reuses existing tested code from AmountScreen, so SmokeTrade is not strictly necessary.

View GitHub Actions results

github-actions[bot] avatar Dec 12 '25 10:12 github-actions[bot]