MetaMask / MetaMask/metamask-extension
As a MetaMask developer, I want to prepopulate state with specific fixture data when running yarn start and yarn dist
- Dominant language
- TypeScript
- Stars
- 13.2k
- Forks
- 5.6k
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 451
Description
As a MetaMask developer, I want to prepopulate state with specific fixture data when running yarn start and yarn dist
This can be very useful for speed of development: I don't need to spend time getting my local stall into the state I need to test my feature, I can just preload with a command
This can improve effectiveness of developers manual testing of their own work: this makes it easy to load different scenarios when developing, and develop against user states that more closely reflect real world usage
This can help with release QA: people testing releases could run `yarn dist` with different fixtures, and quickly get into the state they want to be in to test various edge cases
The most straightforward way to achieve this is a flag on `yarn start` and `yarn dev` that you can pass a json fixture file, and that json will populate the metamask state on background initialization
Something else we could consider, perhaps as a v2, is a feature only available in local development build, that allows uploading a json file from within the wallet UI, which would completely overwrite state, so that rebuilds are not needed to switch between different testing scenarios.
Contributor guide
Research direction
Start by tracing the yarn start, yarn dev, and yarn dist entry points and where background initialization populates MetaMask state. Determine how a JSON fixture would be selected and loaded, and define the completion criteria for preloading state in each command; the optional wallet UI upload is a separate possible phase.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100