Commit bdeebbd
test: first test in smoke perps (#21953)
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->
## **Description**
This PR is splitting the content of another much bigger
[PR](#20936) to simplify
the review and merge
I'll be adding add funds in perps
<!--
Write a short description of the changes included in this pull request,
also include relevant motivation and context. Have in mind the following
questions:
1. What is the reason for the change?
2. What is the improvement/solution?
-->
## **Changelog**
<!--
If this PR is not End-User-Facing and should not show up in the
CHANGELOG, you can choose to either:
1. Write `CHANGELOG entry: null`
2. Label with `no-changelog`
If this PR is End-User-Facing, please write a short User-Facing
description in the past tense like:
`CHANGELOG entry: Added a new tab for users to see their NFTs`
`CHANGELOG entry: Fixed a bug that was causing some NFTs to flicker`
(This helps the Release Engineer do their job more quickly and
accurately)
-->
CHANGELOG entry:
## **Related issues**
Fixes:
## **Manual testing steps**
```gherkin
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**
<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->
### **Before**
<!-- [screenshots/recordings] -->
### **After**
<!-- [screenshots/recordings] -->
## **Pre-merge author checklist**
- [ ] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] 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](https://jsdoc.app/) format
if applicable
- [ ] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
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.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Adds Perps E2E smoke tests and infrastructure (HTTP command-queue
bridge, mocks, Sentry module aliasing) and runs them on iOS/Android CI.
>
> - **E2E Perps Infrastructure**:
> - Add HTTP command-queue polling in
`app/components/UI/Perps/utils/e2eBridgePerps.ts` with deep link handler
refinements, mock deposit, and duplicate-link protection.
> - Introduce command queue server
(`e2e/framework/fixtures/CommandQueueServer.ts`) and plumb ports via
`app/util/test/utils.js`, `shim.js`, Detox reverse ports, and fixture
lifecycle.
> - Expand Perps controller mixin
(`e2e/controller-mocking/mock-config/perps-controller-mixin.ts`) with
overrides for orders, fills, funding, cancel order, TP/SL updates,
deterministic liquidation price, and provider wrapping.
> - Enhance Perps mock service (`e2e/.../perps-e2e-mocks.ts`) with
deposits, close fills, orders history, TP/SL trigger orders, price/liq
handling, and seeded data.
> - Add Arbitrum RPC and API mocks
(`e2e/api-mocking/perps-arbitrum-mocks.ts`).
> - **New Tests & Page Objects**:
> - Add Perps “Add funds” smoke spec
(`e2e/specs/perps/perps-add-funds.spec.ts`) and helpers/pages
(`PerpsDepositView`, `PerpsDepositProcessingView`, updates to
`PerpsTabView`, `TabBarComponent`, `Matchers`).
> - Update deep link mapping to `metamask://e2e/perps/`
(`e2e/framework/DeepLink.ts`) and add server-driven modifiers.
> - **CI**:
> - Add `perps-android-smoke` and `perps-ios-smoke` jobs and include
them in report steps.
> - **Module Aliasing**:
> - Alias Sentry packages to E2E no-op mocks via `metro.config.js`; add
mock files under `e2e/module-mocking/sentry/`.
> - **Config/Quality**:
> - Exclude `e2eBridgePerps.ts` from Sonar analysis; add docs
(`e2e/docs/*`).
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
c904dce. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent b7ed33d commit bdeebbd
File tree
26 files changed
+1453
-105
lines changed- .github/workflows
- app
- components/UI/Perps/utils
- util/test
- e2e
- api-mocking/mock-responses
- controller-mocking
- mock-config
- mock-responses/perps
- docs
- framework
- fixtures
- module-mocking/sentry
- pages
- Perps
- wallet
- specs/perps
- helpers
26 files changed
+1453
-105
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
32 | 47 | | |
33 | 48 | | |
34 | 49 | | |
| |||
155 | 170 | | |
156 | 171 | | |
157 | 172 | | |
| 173 | + | |
158 | 174 | | |
159 | 175 | | |
160 | 176 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
47 | 62 | | |
48 | 63 | | |
49 | 64 | | |
| |||
156 | 171 | | |
157 | 172 | | |
158 | 173 | | |
| 174 | + | |
159 | 175 | | |
160 | 176 | | |
161 | 177 | | |
| |||
0 commit comments