Skip to content

test: fix flaky test Settings Redirects to ENS domains when user inputs ENS into address bar#41396

Merged
HowardBraham merged 2 commits into
mainfrom
flaky-ens-cleanstate
Apr 2, 2026
Merged

test: fix flaky test Settings Redirects to ENS domains when user inputs ENS into address bar#41396
HowardBraham merged 2 commits into
mainfrom
flaky-ens-cleanstate

Conversation

@seaona

@seaona seaona commented Mar 31, 2026

Copy link
Copy Markdown
Member

Description

This test is flaky as sometimes we are not redirected to the ENS resolved page.
We tried to mitigate this by getting the getPersistedState, but that reads fixture data immediately. Instead we will now wait for the live controller state (via Redux) to confirm the ipfsGateway and useAddressBarEnsResolution settings are active. Which reflects the running controller state that has been synced to the UI after background init.

Changelog

CHANGELOG entry:

Related issues

Fixes:

Manual testing steps

  1. Check ci

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
Test-only change that adjusts a wait condition; no production logic or security-sensitive code is modified.

Overview
Fixes flakiness in the ENS address-bar redirect E2E by switching the readiness check from window.stateHooks.getPersistedState() (fixture/IndexedDB) to getCleanAppState() (live Redux/controller state).

The test now waits until both metamask.ipfsGateway === 'dweb.link' and metamask.useAddressBarEnsResolution === true are active before attempting the ENS navigation/redirect assertion.

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

@metamaskbot metamaskbot added the team-qa QA team label Mar 31, 2026
@seaona seaona added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Mar 31, 2026
@metamaskbotv2

metamaskbotv2 Bot commented Mar 31, 2026

Copy link
Copy Markdown
Contributor
Builds ready [218cfd2]
⚡ Performance Benchmarks (Total: 🟢 17 pass · 🟡 1 warn · 🔴 0 fail)

Baseline (latest main): 747fda5 | Date: 5/14/58216 | Pipeline: 23800808488 | 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: +11%
  • loadNewAccount/total: +11%
  • bridgeUserActions/bridge_load_asset_picker: -25%
  • bridgeUserActions/bridge_search_token: -21%
  • bridgeUserActions/total: -18%
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/initialActions: -38%
  • startupPowerUserHome/numNetworkReqs: +13%
  • startupStandardHome/firstPaint: -20%
  • startupStandardHome/setupStore: +10%
  • startupPowerUserHome/numNetworkReqs: +15%
  • startupStandardHome/initialActions: -17%
  • startupPowerUserHome/domInteractive: +13%
  • startupPowerUserHome/setupStore: +15%
  • startupStandardHome/initialActions: -38%
  • startupStandardHome/setupStore: +25%
  • startupPowerUserHome/domInteractive: +24%
  • startupPowerUserHome/setupStore: +19%
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/confirmSrpToPwForm: +18%
  • onboardingImportWallet/doneButtonToHomeScreen: -76%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: +52%
  • onboardingImportWallet/total: -40%
  • onboardingNewWallet/srpButtonToPwForm: +12%
  • onboardingNewWallet/agreeButtonToOnboardingSuccess: +30%
  • onboardingNewWallet/doneButtonToAssetList: -40%
  • onboardingNewWallet/total: -33%
  • assetDetails/assetClickToPriceChart: -65%
  • assetDetails/total: -65%
  • solanaAssetDetails/assetClickToPriceChart: -61%
  • solanaAssetDetails/total: -61%
  • importSrpHome/loginToHomeScreen: +21%
  • importSrpHome/openAccountMenuAfterLogin: -29%
  • importSrpHome/homeAfterImportWithNewWallet: -24%
  • importSrpHome/total: -20%
  • swap/openSwapPageFromHome: -90%
  • swap/fetchAndDisplaySwapQuotes: +25%
🌐 Dapp Page Load Benchmarks

Current Commit: 218cfd2 | Date: 3/31/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±40ms) 🟡 | historical mean value: 1.02s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 741ms (±38ms) 🟢 | historical mean value: 718ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 86ms (±10ms) 🟢 | historical mean value: 86ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 40ms 1.03s 1.35s 1.10s 1.35s
domContentLoaded 741ms 38ms 714ms 1.03s 771ms 1.03s
firstPaint 86ms 10ms 72ms 168ms 92ms 168ms
firstContentfulPaint 86ms 10ms 72ms 168ms 92ms 168ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: 58 Bytes (0%)
  • ui: 5 Bytes (0%)
  • common: 108 Bytes (0%)

@seaona seaona changed the title test: fix test: fix flaky test Settings Redirects to ENS domains when user inputs ENS into address bar Mar 31, 2026
@seaona seaona marked this pull request as ready for review March 31, 2026 14:27
@seaona seaona enabled auto-merge March 31, 2026 19:13
@seaona seaona added this pull request to the merge queue Apr 1, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Apr 1, 2026
@HowardBraham HowardBraham added this pull request to the merge queue Apr 2, 2026
@HowardBraham HowardBraham removed this pull request from the merge queue due to a manual request Apr 2, 2026
@github-actions

github-actions Bot commented Apr 2, 2026

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.

@HowardBraham HowardBraham enabled auto-merge April 2, 2026 08:25
@sonarqubecloud

sonarqubecloud Bot commented Apr 2, 2026

Copy link
Copy Markdown

@HowardBraham HowardBraham added this pull request to the merge queue Apr 2, 2026
@metamaskbotv2

metamaskbotv2 Bot commented Apr 2, 2026

Copy link
Copy Markdown
Contributor
Builds ready [a353c07]
⚡ Performance Benchmarks (Total: 🟢 18 pass · 🟡 0 warn · 🔴 0 fail)

Baseline (latest main): b82d5b2 | Date: 4/24/58221 | Pipeline: 23891361118 | Baseline logs

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

📈 Results compared to the previous 5 runs on main

  • bridgeUserActions/bridge_load_page: -15%
  • bridgeUserActions/bridge_load_asset_picker: -24%
  • bridgeUserActions/bridge_search_token: -20%
  • bridgeUserActions/total: -20%
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/initialActions: +25%
  • startupPowerUserHome/numNetworkReqs: -21%
  • startupPowerUserHome/numNetworkReqs: -37%
  • startupStandardHome/domInteractive: +12%
  • startupStandardHome/initialActions: +67%
  • startupStandardHome/initialActions: -38%
  • startupStandardHome/setupStore: -23%
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/doneButtonToHomeScreen: -76%
  • onboardingImportWallet/openAccountMenuToAccountListLoaded: +51%
  • onboardingImportWallet/total: -33%
  • onboardingNewWallet/skipBackupToMetricsScreen: -26%
  • onboardingNewWallet/doneButtonToAssetList: -34%
  • onboardingNewWallet/total: -28%
  • assetDetails/assetClickToPriceChart: -49%
  • assetDetails/total: -49%
  • solanaAssetDetails/assetClickToPriceChart: -53%
  • solanaAssetDetails/total: -53%
  • importSrpHome/openAccountMenuAfterLogin: -62%
  • importSrpHome/homeAfterImportWithNewWallet: -35%
  • importSrpHome/total: -30%
  • swap/openSwapPageFromHome: -84%
  • swap/fetchAndDisplaySwapQuotes: +38%
  • swap/total: +19%
🌐 Dapp Page Load Benchmarks

Current Commit: a353c07 | Date: 4/2/2026

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.02s (±38ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 715ms (±35ms) 🟢 | historical mean value: 729ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 84ms (±10ms) 🟢 | historical mean value: 85ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.02s 38ms 991ms 1.29s 1.06s 1.29s
domContentLoaded 715ms 35ms 691ms 973ms 740ms 973ms
firstPaint 84ms 10ms 64ms 156ms 92ms 156ms
firstContentfulPaint 84ms 10ms 64ms 156ms 92ms 156ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs
  • background: 58 Bytes (0%)
  • ui: 5 Bytes (0%)
  • common: 20 Bytes (0%)

Merged via the queue into main with commit 8125dd2 Apr 2, 2026
208 of 210 checks passed
@HowardBraham HowardBraham deleted the flaky-ens-cleanstate branch April 2, 2026 09:23
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 2, 2026
@metamaskbot metamaskbot added the release-13.26.0 Issue or pull request that will be included in release 13.26.0 label Apr 2, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

flaky tests no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed release-13.26.0 Issue or pull request that will be included in release 13.26.0 size-S team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants