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: Swap e2e tests improvements #26493

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Open

Conversation

davibroc
Copy link
Contributor

@davibroc davibroc commented Aug 19, 2024

Description

The new extension e2e test automation includes the following test scenarios after the code refactoring.

✓ 1 should swap native token ETH to DAI on Tenderly - Mainnet' (41.2s)
✓ 2 should swap native token ETH to USDC on Tenderly - Optimism' (23.9s)
✓ 3 should swap native token ETH to USDT on Tenderly - Arbitrum' (24.8s)
✓ 4 should swap unapproved token DAI to ETH on Tenderly - Mainnet' (48.2s)
✓ 5 should swap native token ETH to WETH on Tenderly - Mainnet' (39.0s)
✓ 6 should swap wrapped token WETH to ETH on Tenderly - Mainnet' (38.8s)
✓ 7 should swap ERC20->ERC20 token DAI to USDC on Tenderly - Mainnet' (41.0s)

Highlights:

  • re-enabled the script to run in the github pipeline as optional
  • removed flakiness
  • switched to Tenderly corporate account as previously we were using my personal
  • added swaps on different networks (Optimism and Arbitrum)
  • added swap on Mainnet after switching networks
  • added swap of unapproved token
  • added swap of ERC20->ERC20 (DAI to USDC)

Related issues

Fixes:

Manual testing steps

  1. yarn playwright install chromium
  2. yarn
  3. yarn dist
  4. yarn test:e2e:swap

Screenshots/Recordings

e2e_extension.mov

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.

@davibroc davibroc requested a review from a team as a code owner August 19, 2024 12:34
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.

@davibroc davibroc requested review from kumavis and a team as code owners August 22, 2024 17:02
@davibroc davibroc changed the title Test/fix swap e2e tests test: Swap e2e tests improvements Aug 22, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [33a635f]
Page Load Metrics (85 ± 10 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint811541152110
domContentLoaded44130812311
load51130852010
domInteractive9472694
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [d8f0e8f]
Page Load Metrics (76 ± 8 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint77151102199
domContentLoaded4410571189
load5010576188
domInteractive85828136
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link

sonarcloud bot commented Aug 27, 2024

@metamaskbot
Copy link
Collaborator

Builds ready [e288993]
Page Load Metrics (99 ± 34 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint714971318742
domContentLoaded42396967234
load49396997034
domInteractive10187393718
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link

codecov bot commented Aug 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.09%. Comparing base (1b22343) to head (e288993).
Report is 90 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #26493      +/-   ##
===========================================
- Coverage    70.19%   70.09%   -0.10%     
===========================================
  Files         1420     1413       -7     
  Lines        49769    49255     -514     
  Branches     13828    13768      -60     
===========================================
- Hits         34933    34524     -409     
+ Misses       14836    14731     -105     

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

@metamaskbot
Copy link
Collaborator

Builds ready [e288993]
Page Load Metrics (88 ± 13 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint791791182914
domContentLoaded50132842813
load54146882813
domInteractive176933136
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [e288993]
Page Load Metrics (80 ± 23 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint593651106330
domContentLoaded46277764923
load46277804723
domInteractive97528168
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [cdda382]
Page Load Metrics (1632 ± 104 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint19124331443552265
domContentLoaded142723311614213102
load143023621632217104
domInteractive137837168
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link

sonarcloud bot commented Sep 20, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud

@metamaskbot
Copy link
Collaborator

Builds ready [d870874]
Page Load Metrics (1879 ± 86 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint37422851803379182
domContentLoaded16012228184617082
load16102287187917986
domInteractive18168463115
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [d870874]
Page Load Metrics (1766 ± 113 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint34926801706388187
domContentLoaded150526691741237114
load154926781766235113
domInteractive14138412813
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [d870874]
Page Load Metrics (1731 ± 74 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint38420031645318153
domContentLoaded14952074170715273
load15032078173115374
domInteractive13170473617
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 0 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants