Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Fix Swap Smoke tests failures (#8254)
## **Description** The problem with these tests is that we check for the Swap to complete we wait for this pop up message to appear Swap complete ETH to DAI so we call checkIfElementByTextIsVisible which has a timeout of 25 secs. However sometime, depending on network conditions, it can take longer and that’s what causes the flakiness. Right now the 25 secs is hardcoded in checkIfElementByTextIsVisible. I changed the parameter to be optional so I can pass 60 secs which should be enough for the Swap to complete. I also changed some the `Swap from the token chart` test to be a regression not a smoke as it's uncommon and added token chart display test as smoke test ## **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** - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've clearly explained what problem this PR is solving and how it is solved. - [ ] I've linked related issues - [ ] I've included manual testing steps - [ ] I've included screenshots/recordings if applicable - [ ] 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. - [x] I’ve properly set the pull request status: - [ ] In case it's not yet "ready for review", I've set it to "draft". - [ ] In case it's "ready for review", I've changed it from "draft" to "non-draft". ## **Pre-merge reviewer checklist** - [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [x] 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