Skip to content

Commit

Permalink
test: detox black list gas api endpoint (#11096)
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**

The end to end tests hang on the login view because they wait for the
app to complete requests to the gas endpoint. Sometimes, the tests fail
because of this, which creates instability and causes builds on Bitrise
to fail. Additionally, this might be causing a slight increase in build
run times. The solution should be to blacklist the gas endpoint.



## **Related issues**

Fixes:

## **Manual testing steps**

1. Go to this page...
2.
3.

## **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.
  • Loading branch information
cortisiko authored Sep 6, 2024
1 parent 387b9e8 commit f859184
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion e2e/resources/blacklistURLs.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
".*phishing-detection.metafi.codefi.network/.*",
".*phishing-detection.cx.metamask.io/.*",
".*eth.llamarpc.com/.*",
".*token-api.metaswap.codefi.network/.*"
".*token-api.metaswap.codefi.network/.*",
".*gas.api.cx.metamask.io/networks/*"
]
}
3 changes: 3 additions & 0 deletions e2e/specs/confirmations/approve-custom-erc20.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ describe(SmokeConfirmations('ERC20 tokens'), () => {
await TestDApp.tapApproveButton();

//Input custom token amount
await Assertions.checkIfVisible(
ContractApprovalModal.approveTokenAmount,
);
await ContractApprovalModal.clearInput();
await ContractApprovalModal.inputCustomAmount('2');

Expand Down
3 changes: 3 additions & 0 deletions e2e/specs/confirmations/increase-allowance-erc20.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ describe(SmokeConfirmations('ERC20 - Increase Allowance'), () => {
await TestDApp.tapIncreaseAllowanceButton();

//Input custom token amount
await Assertions.checkIfVisible(
ContractApprovalModal.approveTokenAmount,
);
await ContractApprovalModal.clearInput();
await ContractApprovalModal.inputCustomAmount('2');

Expand Down

0 comments on commit f859184

Please sign in to comment.