MetaMask / MetaMask/metamask-mobile

Remove Enzyme usage (3/5)

Open
#12,298 0 comments 0 reactions 0 assignees View on GitHub
good first issue team-mobile-platform
Dominant language
TypeScript
Stars
3k
Forks
1.7k
Avg merge
1d 14h
Merged PRs (30d)
669

Description

### What is this about?

### What is this about?

Replace enzyme usage in the follow files with React testing library

```
app/components/UI/CollectibleContractOverview/index.test.tsx
app/components/UI/CollectibleContractInformation/index.test.tsx
app/components/UI/AssetElement/index.test.tsx
app/components/UI/AddCustomCollectible/index.test.tsx
app/components/UI/AccountFromToInfoCard/AccountFromToInfoCard.test.tsx
app/components/Views/Settings/GeneralSettings/index.test.tsx
app/components/Views/Settings/Contacts/index.test.tsx
app/component-library/components-temp/CustomSpendCap/CustomInput/CustomInput.test.tsx
app/component-library/components-temp/Contracts/ContractBox/ContractBox.test.tsx
app/component-library/components-temp/Contracts/ContractBoxBase/ContractBoxBase.test.tsx
app/component-library/components-temp/Accounts/AccountBase/AccountBase.test.tsx
app/component-library/components-temp/Accounts/AccountBalance/AccountBalance.test.tsx
app/component-library/components/Sheet/SheetHeader/SheetHeader.test.tsx
app/component-library/components/Sheet/SheetBottom/SheetBottom.test.tsx
app/component-library/components/Texts/TextWithPrefixIcon/TextWithPrefixIcon.test.tsx
app/component-library/components/Tags/TagUrl/TagUrl.test.tsx
app/component-library/components/Navigation/TabBarItem/TabBarItem.test.tsx
app/component-library/components/Modals/ModalConfirmation/ModalConfirmation.test.tsx
app/component-library/components/List/ListItemColumn/ListItemColumn.test.tsx
app/component-library/components/Form/TextField/TextField.test.tsx
```

### Scenario

_No response_

### Design

_No response_

### Technical Details

_No response_

### Threat Modeling Framework

_No response_

### Acceptance Criteria

- All files listed should no longer have traces of enzyme

### 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_

### Scenario

_No response_

### Design

_No response_

### Technical Details

_No response_

### Threat Modeling Framework

_No response_

### Acceptance Criteria

_No response_

### 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_

Contributor guide

Open the contributing guide

Research direction

Start by opening the 20 listed .test.tsx files and identify their Enzyme usage. Replace that usage with React Testing Library, then run the relevant tests; the work is done when every listed file passes and contains no traces of Enzyme.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, react-native, typescript
Domain
mobile, testing
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.