Skip to content

Commit 48e4335

Browse files
test: add integration test for inauthentic token swap alert (MetaMask#31482)
<!-- 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** Adds first integration test and related mocks for checking the swap alert for potentially inauthentic token. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/31482?quickstart=1) ## **Related issues** Fixes: [MMQA-280](https://consensyssoftware.atlassian.net/browse/MMQA-280) ## **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 Extension Coding Standards](https://github.com/MetaMask/metamask-extension/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-extension/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. [MMQA-280]: https://consensyssoftware.atlassian.net/browse/MMQA-280?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ --------- Co-authored-by: Ramon AC <36987446+racitores@users.noreply.github.com>
1 parent 7b8d936 commit 48e4335

File tree

4 files changed

+765
-15
lines changed

4 files changed

+765
-15
lines changed

test/integration/data/integration-init-state.json

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -798,21 +798,8 @@
798798
"openSeaEnabled": false,
799799
"orderedNetworkList": [],
800800
"participateInMetaMetrics": false,
801-
"pendingApprovalCount": 1,
802-
"pendingApprovals": {
803-
"testApprovalId": {
804-
"id": "testApprovalId",
805-
"time": 1528133319641,
806-
"origin": "metamask",
807-
"type": "transaction",
808-
"requestData": {
809-
"txId": "testTransactionId"
810-
},
811-
"requestState": {
812-
"test": "value"
813-
}
814-
}
815-
},
801+
"pendingApprovalCount": 0,
802+
"pendingApprovals": {},
816803
"permissionHistory": {
817804
"https://metamask.github.io": {
818805
"eth_accounts": {

0 commit comments

Comments
 (0)