Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Assert accounts are removed with snap removal in existing test #24442

Merged
merged 5 commits into from May 20, 2024

Conversation

plasmacorral
Copy link
Contributor

@plasmacorral plasmacorral commented May 8, 2024

Description

Updating existing test to confirm that accounts are removed when the snap is removed

Open in GitHub Codespaces

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.

Copy link
Contributor

github-actions bot commented May 8, 2024

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.

@plasmacorral plasmacorral changed the title Assert accounts are removed with snap removal in existing test Test: Assert accounts are removed with snap removal in existing test May 8, 2024
@plasmacorral plasmacorral changed the title Test: Assert accounts are removed with snap removal in existing test test: Assert accounts are removed with snap removal in existing test May 8, 2024
@plasmacorral plasmacorral added team-accounts needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) e2e-test End to end test for the MetaMask extension labels May 8, 2024
@plasmacorral plasmacorral self-assigned this May 8, 2024
@plasmacorral plasmacorral removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label May 8, 2024
Copy link

codecov bot commented May 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@metamaskbot
Copy link
Collaborator

Builds ready [638b002]
Page Load Metrics (359 ± 419 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint7013887189
domContentLoaded94415105
load583323359872419
domInteractive94415105
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@plasmacorral plasmacorral marked this pull request as ready for review May 9, 2024 01:47
@plasmacorral plasmacorral requested a review from a team as a code owner May 9, 2024 01:47
@plasmacorral plasmacorral added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label May 9, 2024
@hjetpoluru
Copy link
Contributor

Could we include more assertions based on the specific account that was added? Otherwise, it looks good.

@hjetpoluru hjetpoluru self-requested a review May 9, 2024 20:32
@plasmacorral
Copy link
Contributor Author

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.

@hjetpoluru
Copy link
Contributor

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.

Copy link
Contributor

@hjetpoluru hjetpoluru left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Copy link
Contributor

@chloeYue chloeYue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@metamaskbot
Copy link
Collaborator

Builds ready [40bcb35]
Page Load Metrics (1181 ± 660 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint73162932110
domContentLoaded10361684
load61318411811374660
domInteractive10361684
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [4bfd166]
Page Load Metrics (1916 ± 609 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint854051397436
domContentLoaded109821199
load71427119161269609
domInteractive109821199
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@chloeYue
Copy link
Contributor

Merge this PR as Mike's OOO.

@chloeYue chloeYue merged commit 261e538 into develop May 20, 2024
72 checks passed
@chloeYue chloeYue deleted the e2e/confirm-account-removed-in-snap-removal branch May 20, 2024 12:44
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label May 20, 2024
@github-actions github-actions bot locked and limited conversation to collaborators May 20, 2024
@metamaskbot metamaskbot added the release-11.18.0 Issue or pull request that will be included in release 11.18.0 label May 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
e2e-test End to end test for the MetaMask extension release-11.18.0 Issue or pull request that will be included in release 11.18.0 team-accounts
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants