1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 03:12:42 +02:00

Add QA migration guide (#14544)

* Add QA migration guide

* Add full length gif of updating the build

* Use directory term where it seems more appropriate and better formatting
This commit is contained in:
Thomas Huang 2022-08-02 14:42:50 -07:00 committed by GitHub
parent f425e482e4
commit 3e7d4d314c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
### QA Migrations Guide
Migrations are needed to change top-level state data, this can be found in the browser's storage. This can look like removing specific keys/value pairs from state, changing objects to an array of objects, changing the name of a controller, etc.
Steps
1. Create a new MetaMask directory\* folder locally with the source files before the migration, and load it as an unpacked extension in Chrome\*. If the migration is in a pull request, then build the `develop` branch to load. If the migration is already in `develop`, get a commit before the migration was added to build.
![Load unpacked extension to chrome](./assets/load-build-chrome.gif)
##### \* For migrations targeting specific features behind a feature flag add them appropriately to the `.metamaskrc` file before building.
##### \* In order for the "Load unpacked" button to be shown developer mode needs to be enabled.
2. Once the build has been loaded and state data has been initialized, ensure that the data in question that the migration targets is present in the local storage data.
![Chrome storage state](./assets/chrome-storage-local.png)
3. To trigger the migration a build with the migration will need to replace the files in the directory where the extension is loaded from, and refresh the extension.
![gif of replacing files and reloading the extension](./assets/folder-file-replacement-build.gif)
4. Ensure that the data has been changed/deleted/etc.

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

BIN
docs/assets/load-build-chrome.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 MiB