Skip to content

Commit

Permalink
test: Added swap ERC20->ETH test case (#9734)
Browse files Browse the repository at this point in the history
<!--
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**

We are adding 1 test case to the smoke test automation that covers
ERC20->ETH swap. Having only ETH->ERC20 poses the risk that we might
miss bugs like this one
#9677

## **Related issues**

## **Manual testing steps**

Run `yarn test:e2e:android:debug:run
e2e/specs/swaps/swap-action-smoke.spec.js`

## **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**

- [x] I’ve followed [MetaMask 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
- [x] 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**

- [x] 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.
  • Loading branch information
davibroc authored May 24, 2024
1 parent 6df942e commit 8ee5376
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions e2e/specs/swaps/swap-action-smoke.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ describe(SmokeSwaps('Swap from Actions'), () => {
it.each`
quantity | sourceTokenSymbol | destTokenSymbol
${'.05'} | ${'ETH'} | ${'USDT'}
${'100'} | ${'USDT'} | ${'ETH'}
`(
"should Swap $quantity '$sourceTokenSymbol' to '$destTokenSymbol'",
async ({ quantity, sourceTokenSymbol, destTokenSymbol }) => {
Expand Down

0 comments on commit 8ee5376

Please sign in to comment.