Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: migrate more token tests and update related page objects (#29651)
<!-- 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** This PR introduces significant improvements to the token-related E2E tests and page objects, focusing on better test coverage and maintainability. The changes include: 1. Enhanced token management functionality: - New page objects for token approval and transfer modals - Improved token existence checks - Streamlined gas fee editing capabilities - Better navigation controls for token-related features 2. Test infrastructure improvements: - Added data-testid attributes for more reliable testing - Consolidated mock functions - Improved transaction validation checks - Enhanced custom token creation and approval process testing - Fixed flaky tests 3. Code quality updates: - Reorganised dapp page object structure - Improved code maintainability through refactoring ## **Related issues** N/A ## **Manual testing steps** 1. Run the E2E test suite focusing on token-related tests 2. Verify token test flows with the new page objects ## **Screenshots/Recordings** <!-- Test execution recordings can be added here if available --> ## **Pre-merge author checklist** - [x] 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) - [x] I've completed the PR template to the best of my ability - [x] I've included tests (primary focus of this PR) - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format - [x] I've applied the appropriate labels (team-qa) ## **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