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: snap account contract interaction #26234

Merged
merged 16 commits into from
Aug 13, 2024

Conversation

plasmacorral
Copy link
Contributor

@plasmacorral plasmacorral commented Jul 30, 2024

Description

This PR will introduce an e2e test for a snap account interacting with a contract via the test dapp.

Open in GitHub Codespaces

Related issues

Fixes: 470

Manual testing steps

yarn build:test:mv2 then ENABLE_MV3=false yarn test:e2e:single test/e2e/accounts/snap-account-contract-interaction.spec.ts --browser=firefox
yarn build:test then yarn test:e2e:single test/e2e/accounts/snap-account-contract-interaction.spec.ts --browser=chrome

Screenshots/Recordings

Before

After

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.

@plasmacorral plasmacorral added team-accounts e2e-test End to end test for the MetaMask extension labels Jul 30, 2024
@plasmacorral plasmacorral self-assigned this Jul 30, 2024
Copy link
Contributor

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.

@metamaskbot
Copy link
Collaborator

Builds ready [ec5bed6]
Page Load Metrics (75 ± 24 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint622511125326
domContentLoaded9117353517
load38185755024
domInteractive9117353517
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link

codecov bot commented Aug 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.13%. Comparing base (b3c2323) to head (fd3ac1b).
Report is 2 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #26234   +/-   ##
========================================
  Coverage    70.13%   70.13%           
========================================
  Files         1435     1435           
  Lines        50309    50309           
  Branches     13897    13897           
========================================
  Hits         35283    35283           
  Misses       15026    15026           

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

@metamaskbot
Copy link
Collaborator

Builds ready [aaf9fa7]
Page Load Metrics (203 ± 248 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint731731212512
domContentLoaded126429168
load452456203517248
domInteractive126429168
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 August 2, 2024 22:59
@plasmacorral plasmacorral requested a review from a team as a code owner August 2, 2024 22:59
@plasmacorral plasmacorral added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Aug 2, 2024
@@ -745,7 +745,7 @@ const PRIVATE_KEY =
'0x7C9529A67102755B7E6102D6D950AC5D5863C98713805CEC576B945B15B71EAC';

const PRIVATE_KEY_TWO =
'0xa444f52ea41e3a39586d7069cb8e8233e9f6b9dea9cbb700cce69ae860661cc8';
'0xf444f52ea41e3a39586d7069cb8e8233e9f6b9dea9cbb700cce69ae860661cc8';
Copy link
Contributor Author

@plasmacorral plasmacorral Aug 2, 2024

Choose a reason for hiding this comment

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

Corrected the PRIVATE_KEY_TWO to ensure that we create the public address specified as ACCOUNT_2, rather than using public address 0x66ba6a97bf7e686c171cae1b754bca1521888dc1 (which is what the a gave us.

owencraston
owencraston previously approved these changes Aug 2, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [e1b9d41]
Page Load Metrics (464 ± 399 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6550013410952
domContentLoaded9297396330
load432835464830399
domInteractive9297396330
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@plasmacorral plasmacorral force-pushed the test/snap-account-contract-interaction branch 2 times, most recently from 2c22a99 to a682167 Compare August 13, 2024 15:58
@metamaskbot
Copy link
Collaborator

Builds ready [a682167]
Page Load Metrics (241 ± 250 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint72141104189
domContentLoaded106625157
load421984241522250
domInteractive96625157
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 13, 2024
@plasmacorral plasmacorral force-pushed the test/snap-account-contract-interaction branch from 6b4e266 to fd3ac1b Compare August 13, 2024 20:10
Copy link

@metamaskbot
Copy link
Collaborator

Builds ready [fd3ac1b]
Page Load Metrics (71 ± 10 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint77149107199
domContentLoaded107126189
load42124712110
domInteractive107126189
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [fd3ac1b]
Page Load Metrics (71 ± 10 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint77149107199
domContentLoaded107126189
load42124712110
domInteractive107126189
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@plasmacorral plasmacorral merged commit 50949f8 into develop Aug 13, 2024
78 checks passed
@plasmacorral plasmacorral deleted the test/snap-account-contract-interaction branch August 13, 2024 21:52
@plasmacorral plasmacorral removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Aug 13, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Aug 13, 2024
@metamaskbot metamaskbot added the release-12.4.0 Issue or pull request that will be included in release 12.4.0 label Aug 13, 2024
@gauthierpetetin gauthierpetetin added release-12.3.0 Issue or pull request that will be included in release 12.3.0 and removed release-12.4.0 Issue or pull request that will be included in release 12.4.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.3.0 Issue or pull request that will be included in release 12.3.0 team-accounts
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants