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

feat: account watcher e2e #26524

Merged
merged 57 commits into from
Aug 21, 2024
Merged

feat: account watcher e2e #26524

merged 57 commits into from
Aug 21, 2024

Conversation

k-g-j
Copy link
Contributor

@k-g-j k-g-j commented Aug 19, 2024

Description

This PR introduces end-to-end (E2E) tests for the account watcher feature. The tests cover the following scenarios:

  • Adding a watch account using a valid externally owned address (EOA).
  • Ensuring the “Send,” “Swap,” and “Bridge” buttons are disabled for watch accounts.
  • Handling various invalid inputs, such as missing prefixes, invalid addresses, and ENS names.
  • Preventing the import of private keys for watched addresses.
  • Verifying the absence of the “Show private key” button for watch accounts.
  • Removing and re-adding a watch account to validate proper account management.

Open in GitHub Codespaces

Related issues

Fixes: https://github.com/MetaMask/accounts-planning/issues/438

Manual testing steps

  1. Build for test: yarn build:test
  2. Run the new e2e: yarn test:e2e:single test/e2e/accounts/create-watch-account.spec.ts --browser=chrome --leave-running

Screenshots/Recordings

N/A

Pre-merge author checklist

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.

k-g-j and others added 30 commits August 13, 2024 16:03
…atcher-snap

# Conflicts:
#	app/scripts/snaps/preinstalled-snaps.ts
#	yarn.lock
Copy link

codecov bot commented Aug 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.01%. Comparing base (c85cf5b) to head (8ea6344).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #26524   +/-   ##
========================================
  Coverage    70.01%   70.01%           
========================================
  Files         1410     1410           
  Lines        49130    49130           
  Branches     13739    13739           
========================================
  Hits         34398    34398           
  Misses       14732    14732           

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

@metamaskbot
Copy link
Collaborator

Builds ready [e1b1b48]
Page Load Metrics (92 ± 10 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint981771222412
domContentLoaded54131892311
load61131922110
domInteractive127137178
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 28.56 KiB (0.86%)
  • ui: 2.58 KiB (0.04%)
  • common: 350.3 KiB (4.46%)

@k-g-j k-g-j marked this pull request as ready for review August 20, 2024 19:57
@k-g-j k-g-j requested review from a team as code owners August 20, 2024 19:57
@metamaskbot
Copy link
Collaborator

Builds ready [390483c]
Page Load Metrics (77 ± 8 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint79136101178
domContentLoaded5211371188
load5911377168
domInteractive115928126
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

owencraston
owencraston previously approved these changes Aug 20, 2024
Copy link

@metamaskbot
Copy link
Collaborator

Builds ready [8ea6344]
Page Load Metrics (83 ± 13 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint611951123316
domContentLoaded39151792813
load46151832713
domInteractive95929157
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [8ea6344]
Page Load Metrics (83 ± 13 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint611951123316
domContentLoaded39151792813
load46151832713
domInteractive95929157
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link
Member

@gantunesr gantunesr left a comment

Choose a reason for hiding this comment

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

Good work

@k-g-j k-g-j merged commit 187da88 into develop Aug 21, 2024
78 checks passed
@k-g-j k-g-j deleted the feat/account-watcher-e2e branch August 21, 2024 19:14
@github-actions github-actions bot locked and limited conversation to collaborators Aug 21, 2024
@metamaskbot metamaskbot added the release-12.5.0 Issue or pull request that will be included in release 12.5.0 label Aug 21, 2024
@gauthierpetetin gauthierpetetin added release-12.4.0 Issue or pull request that will be included in release 12.4.0 and removed release-12.5.0 Issue or pull request that will be included in release 12.5.0 labels Sep 11, 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-12.4.0 Issue or pull request that will be included in release 12.4.0 team-accounts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants