Skip to content

test: Add SSE and STX to tests#41468

Open
davibroc wants to merge 3 commits intomainfrom
test/enable-stx-bridge-tests
Open

test: Add SSE and STX to tests#41468
davibroc wants to merge 3 commits intomainfrom
test/enable-stx-bridge-tests

Conversation

@davibroc
Copy link
Copy Markdown
Contributor

@davibroc davibroc commented Apr 3, 2026

Description

Changelog

CHANGELOG entry:

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

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.

Note

Low Risk
Changes are limited to E2E test fixtures/mocks and a privacy allowlist entry, with no production logic impact; main risk is increased test flakiness due to new async SSE/STX flows and timeouts.

Overview
Updates Bridge E2E coverage to run with SSE quote streaming enabled and (optionally) Smart Transactions (STX), including new mocks for getQuoteStream and STX sentinel/transaction service endpoints and updated fixture flag plumbing.

Adjusts bridge test flows to handle the STX status modal (waiting for complete/failed and closing to view activity), refactors shared enterBridgeQuote helper, and tweaks a few test expectations/mock payloads (e.g., balances, tx status shape, and swap quote value). Also adds tx-sentinel-linea-mainnet.api.cx.metamask.io to privacy-snapshot.json.

Written by Cursor Bugbot for commit 72a0784. This will update automatically on new commits. Configure here.

@davibroc davibroc requested review from a team as code owners April 3, 2026 02:14
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 3, 2026

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 metamaskbot added the team-qa QA team label Apr 3, 2026
@davibroc davibroc changed the title Add SSE and STX to tests test: Add SSE and STX to tests Apr 3, 2026
@davibroc davibroc added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Apr 3, 2026
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Apr 3, 2026

✨ Files requiring CODEOWNER review ✨

🕵️ @MetaMask/extension-privacy-reviewers (1 files, +1 -0)
  • 📄 privacy-snapshot.json +1 -0

🧪 @MetaMask/qa (1 files, +36 -0)
  • 📁 test/
    • 📁 e2e/
      • 📁 page-objects/
        • 📁 pages/
          • 📁 bridge/
            • 📄 quote-page.ts +36 -0

🔄 @MetaMask/swaps-engineers (7 files, +660 -107)
  • 📁 test/
    • 📁 e2e/
      • 📁 page-objects/
        • 📁 pages/
          • 📁 bridge/
            • 📄 quote-page.ts +36 -0
      • 📁 tests/
        • 📁 bridge/
          • 📁 mocks/
            • 📄 swap-quotes-eth-musd.json +4 -4
            • 📄 bridge-L2-tests.spec.ts +7 -3
            • 📄 bridge-negative-cases.spec.ts +12 -27
            • 📄 bridge-positive-cases.spec.ts +7 -11
            • 📄 bridge-test-utils.ts +592 -61
            • 📄 swap-positive-cases.spec.ts +2 -1

@github-actions github-actions bot added the size-L label Apr 3, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 3, 2026

@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Apr 3, 2026

Builds ready [71711e5]
⚡ Performance Benchmarks (Total: 🟢 6 pass · 🟡 12 warn · 🔴 0 fail)

Baseline (latest main): f34f804 | Date: 9/10/58222 | Pipeline: 23930764831 | Baseline logs

Interaction Benchmarks
Benchmarkchrome-browserify
loadNewAccount🟡 [Show logs]
confirmTx🟡 [Show logs]
bridgeUserActions🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • loadNewAccount/load_new_account: -15%
  • loadNewAccount/total: -15%
  • bridgeUserActions/bridge_search_token: -15%
  • bridgeUserActions/total: -11%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 loadNewAccount/FCP: p75 2.4s
  • 🟡 confirmTx/FCP: p75 2.4s
  • 🟡 bridgeUserActions/FCP: p75 2.5s
Startup Benchmarks
Benchmarkchrome-browserifychrome-webpackfirefox-browserifyfirefox-webpack
startupStandardHome🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]
startupPowerUserHome🟡 [Show logs]🟡 [Show logs]
🟡 loadScripts
[Show logs]
🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • startupStandardHome/load: -11%
  • startupStandardHome/domContentLoaded: -13%
  • startupStandardHome/domInteractive: +13%
  • startupStandardHome/firstPaint: -12%
  • startupStandardHome/backgroundConnect: +14%
  • startupStandardHome/initialActions: +25%
  • startupStandardHome/loadScripts: -16%
  • startupStandardHome/setupStore: +14%
  • startupPowerUserHome/uiStartup: -13%
  • startupPowerUserHome/backgroundConnect: +60%
  • startupPowerUserHome/setupStore: -11%
  • startupPowerUserHome/numNetworkReqs: -52%
  • startupStandardHome/uiStartup: -14%
  • startupStandardHome/load: -13%
  • startupStandardHome/domContentLoaded: -12%
  • startupStandardHome/backgroundConnect: -36%
  • startupStandardHome/firstReactRender: -20%
  • startupStandardHome/loadScripts: -12%
  • startupStandardHome/numNetworkReqs: -29%
  • startupPowerUserHome/domInteractive: -20%
  • startupPowerUserHome/numNetworkReqs: +45%
  • startupStandardHome/domInteractive: -59%
  • startupStandardHome/initialActions: -38%
  • startupStandardHome/numNetworkReqs: -16%
  • startupPowerUserHome/load: +10%
  • startupPowerUserHome/domContentLoaded: +10%
  • startupPowerUserHome/domInteractive: +23%
  • startupPowerUserHome/backgroundConnect: -26%
  • startupPowerUserHome/loadScripts: +11%
  • startupPowerUserHome/setupStore: +27%
  • startupStandardHome/uiStartup: -11%
  • startupStandardHome/load: -10%
  • startupStandardHome/domContentLoaded: -10%
  • startupStandardHome/domInteractive: -38%
  • startupStandardHome/backgroundConnect: -21%
  • startupStandardHome/initialActions: -44%
  • startupStandardHome/loadScripts: -10%
  • startupStandardHome/setupStore: -57%
  • startupStandardHome/numNetworkReqs: -18%
  • startupPowerUserHome/domInteractive: +15%
  • startupPowerUserHome/backgroundConnect: -29%
  • startupPowerUserHome/setupStore: -16%
  • startupPowerUserHome/numNetworkReqs: -11%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🔴 startupPowerUserHome/INP: p75 768ms
  • 🔴 startupPowerUserHome/INP: p75 744ms
  • 🟡 startupPowerUserHome/LCP: p75 3.7s
  • 🟡 startupPowerUserHome/INP: p75 240ms
  • 🟡 startupPowerUserHome/LCP: p75 3.9s
User Journey Benchmarks
Benchmarkchrome-browserify
onboardingImportWallet🟢 [Show logs]
onboardingNewWallet🟢 [Show logs]
assetDetails🟡 [Show logs]
solanaAssetDetails🟡 [Show logs]
importSrpHome🟡 [Show logs]
sendTransactions🟡 [Show logs]
swap🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • onboardingImportWallet/metricsToWalletReadyScreen: -23%
  • onboardingImportWallet/doneButtonToHomeScreen: -71%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: +22%
  • onboardingImportWallet/total: -38%
  • onboardingNewWallet/skipBackupToMetricsScreen: -17%
  • onboardingNewWallet/agreeButtonToOnboardingSuccess: -25%
  • onboardingNewWallet/doneButtonToAssetList: -32%
  • onboardingNewWallet/total: -27%
  • assetDetails/assetClickToPriceChart: -66%
  • assetDetails/total: -66%
  • solanaAssetDetails/assetClickToPriceChart: -56%
  • solanaAssetDetails/total: -56%
  • importSrpHome/openAccountMenuAfterLogin: -73%
  • importSrpHome/homeAfterImportWithNewWallet: -39%
  • importSrpHome/total: -34%
  • sendTransactions/openSendPageFromHome: +129%
  • sendTransactions/selectTokenToSendFormLoaded: -12%
  • swap/openSwapPageFromHome: -83%
  • swap/fetchAndDisplaySwapQuotes: +31%
  • swap/total: +14%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 assetDetails/INP: p75 208ms
  • 🟡 assetDetails/FCP: p75 2.5s
  • 🟡 solanaAssetDetails/FCP: p75 2.4s
  • 🟡 importSrpHome/INP: p75 232ms
  • 🟡 importSrpHome/FCP: p75 2.4s
  • 🟡 sendTransactions/INP: p75 224ms
  • 🟡 sendTransactions/FCP: p75 2.5s
  • 🟡 swap/FCP: p75 2.5s
🌐 Dapp Page Load Benchmarks

Current Commit: 71711e5 | Date: 4/3/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.02s (±38ms) 🟡 | historical mean value: 1.03s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 717ms (±36ms) 🟢 | historical mean value: 724ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 83ms (±9ms) 🟢 | historical mean value: 86ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.02s 38ms 997ms 1.30s 1.07s 1.30s
domContentLoaded 717ms 36ms 696ms 979ms 752ms 979ms
firstPaint 83ms 9ms 68ms 160ms 92ms 160ms
firstContentfulPaint 83ms 9ms 68ms 160ms 92ms 160ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 998 Bytes (0.02%)
  • ui: -67.96 KiB (-0.8%)
  • common: 55.87 KiB (0.45%)

Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

@davibroc davibroc force-pushed the test/enable-stx-bridge-tests branch from fc07445 to 72a0784 Compare April 3, 2026 05:31
@metamaskbotv2
Copy link
Copy Markdown
Contributor

metamaskbotv2 bot commented Apr 3, 2026

Builds ready [72a0784]
⚡ Performance Benchmarks (Total: 🟢 6 pass · 🟡 12 warn · 🔴 0 fail)

Baseline (latest main): f34f804 | Date: 9/10/58222 | Pipeline: 23935262869 | Baseline logs

Interaction Benchmarks
Benchmarkchrome-browserify
loadNewAccount
🟡 load_new_account
[Show logs]
confirmTx🟡 [Show logs]
bridgeUserActions🟡 [Show logs]

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 loadNewAccount/FCP: p75 2.5s
  • 🟡 confirmTx/FCP: p75 2.5s
  • 🟡 bridgeUserActions/FCP: p75 2.5s
Startup Benchmarks
Benchmarkchrome-browserifychrome-webpackfirefox-browserifyfirefox-webpack
startupStandardHome🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]🟢 [Show logs]
startupPowerUserHome🟡 [Show logs]🟡 [Show logs]🟡 [Show logs]🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • startupStandardHome/load: -12%
  • startupStandardHome/domContentLoaded: -14%
  • startupStandardHome/firstPaint: -18%
  • startupStandardHome/backgroundConnect: +12%
  • startupStandardHome/initialActions: -38%
  • startupStandardHome/loadScripts: -16%
  • startupStandardHome/setupStore: +14%
  • startupPowerUserHome/backgroundConnect: +86%
  • startupPowerUserHome/numNetworkReqs: -51%
  • startupStandardHome/uiStartup: -20%
  • startupStandardHome/load: -20%
  • startupStandardHome/domContentLoaded: -20%
  • startupStandardHome/backgroundConnect: -40%
  • startupStandardHome/firstReactRender: -28%
  • startupStandardHome/loadScripts: -19%
  • startupStandardHome/setupStore: -21%
  • startupStandardHome/numNetworkReqs: -29%
  • startupPowerUserHome/numNetworkReqs: +44%
  • startupStandardHome/domInteractive: -59%
  • startupStandardHome/initialActions: -38%
  • startupStandardHome/numNetworkReqs: -18%
  • startupPowerUserHome/uiStartup: -10%
  • startupPowerUserHome/backgroundConnect: -33%
  • startupStandardHome/domInteractive: -52%
  • startupStandardHome/backgroundConnect: -24%
  • startupStandardHome/initialActions: -44%
  • startupStandardHome/setupStore: -57%
  • startupStandardHome/numNetworkReqs: -18%
  • startupPowerUserHome/uiStartup: -11%
  • startupPowerUserHome/backgroundConnect: -35%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🔴 startupPowerUserHome/INP: p75 712ms
  • 🔴 startupPowerUserHome/INP: p75 616ms
  • 🟡 startupPowerUserHome/LCP: p75 3.5s
  • 🟡 startupPowerUserHome/LCP: p75 3.4s
User Journey Benchmarks
Benchmarkchrome-browserify
onboardingImportWallet🟢 [Show logs]
onboardingNewWallet🟢 [Show logs]
assetDetails🟡 [Show logs]
solanaAssetDetails🟡 [Show logs]
importSrpHome🟡 [Show logs]
sendTransactions🟡 [Show logs]
swap🟡 [Show logs]

📈 Results compared to the previous 5 runs on main

  • onboardingImportWallet/metricsToWalletReadyScreen: -40%
  • onboardingImportWallet/doneButtonToHomeScreen: -71%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: +22%
  • onboardingImportWallet/total: -39%
  • onboardingNewWallet/skipBackupToMetricsScreen: -18%
  • onboardingNewWallet/agreeButtonToOnboardingSuccess: +30%
  • onboardingNewWallet/doneButtonToAssetList: -27%
  • onboardingNewWallet/total: -23%
  • assetDetails/assetClickToPriceChart: -74%
  • assetDetails/total: -74%
  • solanaAssetDetails/assetClickToPriceChart: -55%
  • solanaAssetDetails/total: -55%
  • importSrpHome/openAccountMenuAfterLogin: -69%
  • importSrpHome/homeAfterImportWithNewWallet: -39%
  • importSrpHome/total: -34%
  • sendTransactions/openSendPageFromHome: +84%
  • sendTransactions/selectTokenToSendFormLoaded: -12%
  • swap/openSwapPageFromHome: -87%
  • swap/fetchAndDisplaySwapQuotes: +31%
  • swap/total: +13%

🌐 Core Web Vitals — 🟢 good · 🟡 needs improvement · 🔴 poor (web.dev thresholds)

  • 🟡 assetDetails/INP: p75 248ms
  • 🟡 assetDetails/FCP: p75 2.5s
  • 🟡 solanaAssetDetails/FCP: p75 2.5s
  • 🟡 importSrpHome/INP: p75 208ms
  • 🟡 importSrpHome/FCP: p75 2.5s
  • 🟡 sendTransactions/INP: p75 216ms
  • 🟡 sendTransactions/FCP: p75 2.5s
  • 🟡 swap/FCP: p75 2.6s
🌐 Dapp Page Load Benchmarks

Current Commit: 72a0784 | Date: 4/3/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 978ms (±42ms) 🟢 | historical mean value: 1.03s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 687ms (±39ms) 🟢 | historical mean value: 724ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 83ms (±9ms) 🟢 | historical mean value: 86ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 978ms 42ms 942ms 1.27s 1.01s 1.27s
domContentLoaded 687ms 39ms 661ms 970ms 717ms 970ms
firstPaint 83ms 9ms 72ms 140ms 100ms 140ms
firstContentfulPaint 83ms 9ms 72ms 140ms 100ms 140ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: 58 Bytes (0%)
  • ui: 5 Bytes (0%)
  • common: 20 Bytes (0%)

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

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed size-L team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants