chore: Migrate second batch of. unit tests away from enzyme#8923
Merged
Conversation
Contributor
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> This PR aims to add `hideSubmitButton` property to confirmation templates. Also hiding action buttons will be possible if `onSubmit` and `onCancel` is not provided. ## **Related issues** Fixes: https://github.com/orgs/MetaMask/projects/47/views/1?pane=issue&itemId=55391209 Similar task is resolved in extension MetaMask/metamask-extension#23085 ## **Manual testing steps** To manually test this, either you should add `hideSubmitButton` to true in to your approval request (via code) Or temporarily set `hideSubmitButton` to true in your local at `app/components/Views/confirmations/components/Approval/TemplateConfirmation/Templates/index.ts` `values` constant. (See the recorded video by doing this) ## **Screenshots/Recordings** ### **After** https://github.com/MetaMask/metamask-mobile/assets/7644512/ddad90e6-1e15-40a0-9e1c-887bbdc10ebc ## **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. - [x] I've linked related issues - [x] I've included manual testing steps - [x] 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 - [ ] 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. - [ ] 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** - [ ] 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.
Revert unnecessary changes
8060e1d to
2700e81
Compare
Contributor
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #8923 +/- ##
==========================================
+ Coverage 43.26% 43.50% +0.23%
==========================================
Files 1271 1271
Lines 30921 30921
Branches 3092 3092
==========================================
+ Hits 13379 13452 +73
+ Misses 16769 16688 -81
- Partials 773 781 +8 ☔ View full report in Codecov by Sentry. |
|
brianacnguyen
approved these changes
Mar 14, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Description
The mobile platform team is pushing to reduce the usage of enzyme within the application. This PR puts us one step closer to accomplishing this goal. This batch includes the following files:
Related issues
Fixes: #8806
Manual testing steps
yarn test:unitScreenshots/Recordings
Pre-merge author checklist
Pre-merge reviewer checklist