fix: perf test perps
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
- [ ] I’ve followed MetaMask Contributor Docs and MetaMask Mobile Coding Standards.
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using JSDoc format if applicable
- [ ] I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
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.
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.
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.
🔍 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:
-
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. -
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.
-
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. -
BridgeScreen.js: Refactored to reuse AmountScreen's enterAmount method instead of duplicating the digit-tapping logic. This is code cleanup in test infrastructure.
-
Flows.js: Added
selectAccountDevicehelper for device-based account selection in performance tests. Used by the new perps-position-management.spec.js. -
TimersHelper.js: Removed unused
withTimerstatic 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.
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code