metamask-mobile icon indicating copy to clipboard operation
metamask-mobile copied to clipboard

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

Open Cal-L opened this issue 1 year ago • 1 comments
trafficstars

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

  • [ ] Engineering (needed in most cases)
  • [ ] Design
  • [ ] Product
  • [ ] QA (automation tests are required to pass before merging PRs but not all changes are covered by automation tests - please review if QA is needed beyond automation tests)
  • [ ] Security
  • [ ] Legal
  • [ ] Marketing
  • [ ] Management (please specify)
  • [ ] Other (please specify)

References

No response

Cal-L avatar Feb 18 '24 01:02 Cal-L

I'm working on this

timi-codes avatar Feb 22 '24 05:02 timi-codes

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

AMANn5153 avatar Aug 07 '24 21:08 AMANn5153