metamask-extension
metamask-extension copied to clipboard
test: Assert accounts are removed with snap removal in existing test
Description
Updating existing test to confirm that accounts are removed when the snap is removed
Related issues
Fixes: https://github.com/MetaMask/accounts-planning/issues/439
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
- [ ] I’ve followed MetaMask Coding Standards.
- [ ] I've completed the PR template to the best of my ability
- [ ] I’ve included tests if applicable
- [ ] I’ve documented my code using JSDoc format if applicable
- [ ] I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
Pre-merge reviewer checklist
- [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 67.37%. Comparing base (
4cf7e80
) to head (4bfd166
).
Additional details and impacted files
@@ Coverage Diff @@
## develop #24442 +/- ##
========================================
Coverage 67.37% 67.37%
========================================
Files 1289 1289
Lines 50220 50220
Branches 13005 13005
========================================
Hits 33835 33835
Misses 16385 16385
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Builds ready [638b002]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (359 ± 419 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 70 | 138 | 87 | 18 | 9 |
domContentLoaded | 9 | 44 | 15 | 10 | 5 | ||
load | 58 | 3323 | 359 | 872 | 419 | ||
domInteractive | 9 | 44 | 15 | 10 | 5 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 0 Bytes (0.00%)
- common: 0 Bytes (0.00%)
Could we include more assertions based on the specific account that was added? Otherwise, it looks good.
Could we include more assertions based on the specific account that was added?
Thank you, @hjetpoluru! Yes, we could. Are you suggesting to add assertions to confirm that the created account address is what we expect?
Bear in mind the snap simple keyring (SSK) does create a unique private key on any new account creation. In these tests we are not expecting a specific account address, rather just some public address derived from the private key that was created. Verifying the address that was added in the accounts list would certainly be beneficial if we were testing the import of a known private key through SSK, but here we are a creating new random private key.
Yes, I totally agree with you that the address is dynamically created, and it's validated in the creation of the account in another test.
Builds ready [40bcb35]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1181 ± 660 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 73 | 162 | 93 | 21 | 10 |
domContentLoaded | 10 | 36 | 16 | 8 | 4 | ||
load | 61 | 3184 | 1181 | 1374 | 660 | ||
domInteractive | 10 | 36 | 16 | 8 | 4 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 0 Bytes (0.00%)
- common: 0 Bytes (0.00%)
Builds ready [4bfd166]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1916 ± 609 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 85 | 405 | 139 | 74 | 36 |
domContentLoaded | 10 | 98 | 21 | 19 | 9 | ||
load | 71 | 4271 | 1916 | 1269 | 609 | ||
domInteractive | 10 | 98 | 21 | 19 | 9 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 0 Bytes (0.00%)
- common: 0 Bytes (0.00%)
Merge this PR as Mike's OOO.