MetaMask / metamask-mobile

Mobile web browser providing access to websites that use the Ethereum blockchain
https://metamask.io
Other
2.18k stars 1.12k forks source link

Reduce enzyme usage in unit test by 25% - [3 of 3] #8618

Closed Cal-L closed 3 weeks ago

Cal-L commented 9 months ago

What is this about?

Convert the list of unit tests to use react-testing-library instead of enzyme. In total there are 53 files to convert. To make PRs easier to review and more manageable, this covers 19 test files.

Scenario

No response

Design

No response

Technical Details

Convert these files

'app/components/Views/EnterPasswordSimple/index.test.tsx',
'app/components/Views/AddBookmark/index.test.tsx',
'app/components/UI/WhatsNewModal/index.test.tsx',
'app/components/UI/SliderButton/index.test.tsx',
'app/components/UI/Screen/index.test.tsx',
'app/components/UI/ReusableModal/index.test.tsx',
'app/components/UI/BlockingActionModal/index.test.tsx',
'app/components/UI/AnimatedTransactionModal/index.test.tsx',
'app/component-library/components/Buttons/Button/variants/ButtonLink/ButtonLink.test.tsx',
'app/components/UI/WarningAlert/WarningAlert.test.tsx',
'app/component-library/components/Texts/Text/Text.test.tsx',
'app/component-library/components/Avatars/Avatar/variants/AvatarIcon/AvatarIcon.test.tsx',
'app/components/Nav/Main/index.test.tsx',
'app/components/UI/SlippageSlider/index.test.tsx',
'app/components/UI/AssetList/index.test.tsx',
'app/components/Views/TransactionsView/index.test.js',
'app/components/Views/PickComponent/index.test.tsx',
'app/components/Approvals/ApprovalModal/ApprovalModal.test.tsx',
'app/components/UI/PaymentRequest/index.test.tsx'

Threat Modeling Framework

No response

Acceptance Criteria

Unit tests for the updated files should all pass. Snapshots should not change.

Stakeholder review needed before the work gets merged

References

No response

timi-codes commented 9 months ago

I'm working on this

AMANn5153 commented 3 months ago

Is this issue still open? I would like to work on it.