MetaMask / MetaMask/metamask-extension

Automated e2etests for migration and version scenario

Open
#19,473 0 comments 0 reactions 2 assignees Claimed by @seaona View on GitHub
epic team-extension-platform
Dominant language
TypeScript
Stars
13.2k
Forks
5.6k
Avg merge
2d 5h
Merged PRs (30d)
451

Description

> Currently the fixture we use in e2e tests is just... whatever state the wallet was in when the test was written. We don't make a habit of updating fixtures, so problems resulting from specific wallet states may go undetected by CI.

We could adopt a practice of regularly updating fixtures to match the latest production wallet state. This would ensure our CI tests match the experience of current production users more closely. Or we could keep a collection of fixtures to represent new, currrent, and older users. e.g. each fixture would have a version for:

The current wallet state
The current production wallet state
An ancient wallet state
Currently updating fixtures is a manual process. It's not trivial to automate it because state changes might happen as a result of a migration, or it might happen because of a change in a controller. The only reliable way to get an updated fixture is to run the real extension and export the state after initialization. We could automate fixture updates by doing exactly that though, and using our e2e tooling to start the extension up and export state to disk.

(from https://github.com/MetaMask/metamask-extension/issues/10694#issuecomment-1087915390)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.