Skip to content

test: add e2e to swap with snap account#25558

Merged
plasmacorral merged 12 commits intodevelopfrom
e2e-snap-account-swap
Jul 2, 2024
Merged

test: add e2e to swap with snap account#25558
plasmacorral merged 12 commits intodevelopfrom
e2e-snap-account-swap

Conversation

@plasmacorral
Copy link
Copy Markdown
Contributor

@plasmacorral plasmacorral commented Jun 27, 2024

Description

Open in GitHub Codespaces

Related issues

Fixes: 469

Manual testing steps

  1. yarn build:test:mv2 then ENABLE_MV3=false yarn test:e2e:single test/e2e/accounts/snap-account-eth-swap.spec.ts --browser=firefox
  2. yarn build:test then yarn test:e2e:single test/e2e/accounts/snap-account-eth-swap.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 requested a review from a team as a code owner June 27, 2024 12:47
@github-actions
Copy link
Copy Markdown
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.

@plasmacorral plasmacorral marked this pull request as draft June 27, 2024 12:48
@metamaskbot metamaskbot added the team-accounts-framework Accounts team label Jun 27, 2024
@plasmacorral plasmacorral added the e2e-test End to end test for the MetaMask extension label Jun 27, 2024
@plasmacorral plasmacorral self-assigned this Jun 27, 2024
@plasmacorral plasmacorral added needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) and removed needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) labels Jun 27, 2024
@plasmacorral plasmacorral changed the title add e2e to swap with snap account e2e test to swap with snap account Jun 27, 2024
@plasmacorral plasmacorral changed the title e2e test to swap with snap account test: add e2e to swap with snap account Jun 27, 2024
@plasmacorral plasmacorral marked this pull request as ready for review June 27, 2024 17:49
@plasmacorral plasmacorral added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Jun 27, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [70bf3c0]
Page Load Metrics (82 ± 12 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint862101132914
domContentLoaded1094362211
load46141822412
domInteractive1094362211
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@codecov
Copy link
Copy Markdown

codecov bot commented Jun 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.60%. Comparing base (198bedd) to head (c43a05e).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #25558   +/-   ##
========================================
  Coverage    69.60%   69.60%           
========================================
  Files         1364     1364           
  Lines        48172    48172           
  Branches     13291    13291           
========================================
  Hits         33526    33526           
  Misses       14646    14646           

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

@seaona
Copy link
Copy Markdown
Member

seaona commented Jul 1, 2024

Overall looks good 🔥 Just added a small suggestion.
Note: there's an unrelated failure in current ci, which will be fixed by this PR. Once it's merged to develop, feel free to update your branch and that should fix your jobs

@plasmacorral plasmacorral removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Jul 1, 2024
@plasmacorral plasmacorral added the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Jul 1, 2024
@plasmacorral plasmacorral requested a review from seaona July 1, 2024 19:03
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [b5c4601]
Page Load Metrics (361 ± 431 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint685111179244
domContentLoaded10199323919
load433147361898431
domInteractive10199323919
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

seaona
seaona previously approved these changes Jul 1, 2024
Copy link
Copy Markdown
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.

The code looks good, in general is a good practice to not have in-values inside the code since it helps to prevent bugs because of typos. For example,

const DAI = 'DAI';
const TEST_ETH = 'TESTETH';

...

await checkActivityTransaction(driver, {
  index: 0,
  amount: '0.001',
  swapFrom: TEST_ETH,
  swapTo: DAI,
});

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Jul 2, 2024

@plasmacorral
Copy link
Copy Markdown
Contributor Author

The code looks good, in general is a good practice to not have in-values inside the code since it helps to prevent bugs because of typos. For example,

const DAI = 'DAI';
const TEST_ETH = 'TESTETH';

...

await checkActivityTransaction(driver, {
  index: 0,
  amount: '0.001',
  swapFrom: TEST_ETH,
  swapTo: DAI,
});

Updated. Thank you!

@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [c43a05e]
Page Load Metrics (149 ± 173 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint73131100178
domContentLoaded95626136
load401716149360173
domInteractive95626136
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@plasmacorral plasmacorral requested review from gantunesr and seaona July 2, 2024 01:25
Copy link
Copy Markdown
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 !

@plasmacorral plasmacorral merged commit c641981 into develop Jul 2, 2024
@plasmacorral plasmacorral deleted the e2e-snap-account-swap branch July 2, 2024 12:30
@github-actions github-actions bot locked and limited conversation to collaborators Jul 2, 2024
@github-actions github-actions bot removed the needs-dev-review PR needs reviews from other engineers (in order to receive required approvals) label Jul 2, 2024
@metamaskbot metamaskbot added the release-12.2.0 Issue or pull request that will be included in release 12.2.0 label Jul 2, 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.2.0 Issue or pull request that will be included in release 12.2.0 team-accounts-framework Accounts team

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants