Skip to content

Commit 0ce62c3

Browse files
test: remove offramp-token-amount e2e test covered by unit tests (MetaMask#27033)
## **Description** Removes `offramp-token-amount.spec.ts` e2e test. All behaviors tested in this e2e test are already covered by existing unit tests in `BuildQuote.test.tsx`. Coverage mapping: | E2E Behavior | Unit Test in BuildQuote.test.tsx | |---|---| | Enter amount via keypad | `updates the amount input` | | Quick amount buttons (25%, MAX) | `updates the amount input with quick amount buttons` | | MAX capped by gas for native token | `updates the amount input up to the max considering gas for native asset` | | Percentage capped by gas (75%, 50%) | `updates the amount input up to the percentage considering gas` | | Freshly opened keyboard clears amount | `clears the amount when the keyboard is freshly opened` | This is part of the effort to convert ramps e2e tests to unit/component tests (MMQA-1492). ### Why not a separate component-view test? `BuildQuote.test.tsx` already **is** a component-view test — it uses `renderScreen()` which renders the full `BuildQuote` component inside a real navigation stack with Redux state. It simulates user interactions via `fireEvent.press` on keypad buttons, asserts displayed text, and tests quick amount buttons (25%, 50%, 75%, MAX) with gas capping. Creating a separate component-view test would duplicate existing coverage. ## **Changelog** CHANGELOG entry: null ## **Related issues** Fixes: [MMQA-1520](https://consensyssoftware.atlassian.net/browse/MMQA-1520) ## **Manual testing steps** ```gherkin Feature: Offramp token amount test removal Scenario: Existing unit tests cover all e2e behaviors Given the BuildQuote.test.tsx unit tests exist And they cover keypad entry, quick amounts, gas capping, and validation When the offramp-token-amount.spec.ts e2e test is removed Then no test coverage is lost And the unit test suite continues to pass ``` ## **Screenshots/Recordings** ### **Before** N/A — test removal, not a UI change. ### **After** N/A — test removal, not a UI change. ## **Pre-merge author checklist** - [x] 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). - [x] 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 - [x] 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. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 29d3005 commit 0ce62c3

1 file changed

Lines changed: 0 additions & 51 deletions

File tree

tests/smoke/ramps/offramp-token-amount.spec.ts

Lines changed: 0 additions & 51 deletions
This file was deleted.

0 commit comments

Comments
 (0)