Skip to content

Conversation

@Unik0rnMaggie
Copy link
Contributor

@Unik0rnMaggie Unik0rnMaggie commented Oct 28, 2025

Description

the test is failing with the following error:

AssertionError` [ERR_ASSERTION]: Expected values to be strictly deep-equal:
+ actual - expected

  {
+   category: 'Onboarding',
-   category: 'App',
    chain_id: '0x1',
+   environment_type: 'fullscreen',
-   environment_type: 'background',
    locale: 'en'
  }

Verifying the captured events when failing, the App installed events are the same as when it succeeds, but in a different order:
Screenshot 2025-10-28 at 17 52 06

Use method assertInAnyOrder for the fix

Open in GitHub Codespaces

Changelog

CHANGELOG entry:

Related issues

Fixes: Flaky test Wallet Created Events - Imported Account are sent when onboarding user who chooses to opt in metrics

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

Stabilizes the wallet-imported metrics e2e test by replacing order-dependent checks with assertInAnyOrder predicate assertions.

  • Tests (e2e/metrics):
    • Switch to order-agnostic assertions using assertInAnyOrder in test/e2e/tests/metrics/wallet-imported.spec.ts.
      • Replace index-based event checks and deep equality with predicate-based assertions for:
        • App Installed (background) and App Installed (fullscreen)
        • Fourth onboarding event (fullscreen)
        • Firefox-only Analytics Preference Selected
        • Chrome-only Wallet Import Attempted
    • Remove getNthEventByName helper usage and brittle sequence assertions.

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

…n onboarding user who chooses to opt in metrics
@github-actions
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 metamaskbot added the team-qa QA team label Oct 28, 2025
@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: 9789e0b | Date: 10/28/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.05s (±41ms) 🟡 | historical mean value: 1.04s ⬆️ (historical data)
  • domContentLoaded-> current mean value: 728ms (±36ms) 🟢 | historical mean value: 728ms ⬆️ (historical data)
  • firstContentfulPaint-> current mean value: 78ms (±11ms) 🟢 | historical mean value: 79ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.05s 41ms 1.01s 1.32s 1.07s 1.32s
domContentLoaded 728ms 36ms 697ms 980ms 751ms 980ms
firstPaint 78ms 11ms 60ms 172ms 88ms 172ms
firstContentfulPaint 78ms 11ms 60ms 172ms 88ms 172ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [9789e0b]
UI Startup Metrics (1275 ± 79 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1275112414537913371405
load109494712857811411231
domContentLoaded108794212747711341223
domInteractive20145692045
firstPaint57289123643811161199
backgroundConnect2332202547237249
firstReactRender27185363039
getState1883562129
initialActions60447723
loadScripts8617271042769051004
setupStore1062731016
BrowserifyPower User HomeuiStartup21161741324252225033242
load1055846175729314531757
domContentLoaded1043842170128314241701
domInteractive271458164458
firstPaint81317917424679081742
backgroundConnect30317710532412981053
firstReactRender24222712527
getState18112522228201222
initialActions52123612
loadScripts832665138123011281381
setupStore1282761227
WebpackStandard HomeuiStartup8757461180788881081
load64959798066656766
domContentLoaded64258997366648755
domInteractive17124891545
firstPaint21057977212202746
backgroundConnect25125482940
firstReactRender291794123446
getState1262341517
initialActions40173510
loadScripts63858796364646745
setupStore1051731215
WebpackPower User HomeuiStartup17391319240134018692401
load73262311221428721122
domContentLoaded70160910181208331018
domInteractive211349123249
firstPaint345110889278628889
backgroundConnect941930492173304
firstReactRender26213942639
getState19514525024199250
initialActions13166212466
loadScripts69660710041168211004
setupStore20681233181
FirefoxBrowserifyStandard HomeuiStartup14221241178310614841643
load1210107314237912571365
domContentLoaded1209107314237912571365
domInteractive1123623540120201
firstPaint------
backgroundConnect3924137174574
firstReactRender25207382545
getState74738711
initialActions411861835
loadScripts1185105613787512281343
setupStore126183171214
BrowserifyPower User HomeuiStartup28212259408860735234088
load13941164199621315291996
domContentLoaded13931164199521315291995
domInteractive17710341895255418
firstPaint------
backgroundConnect18932614179332614
firstReactRender472889164789
getState16411521929190219
initialActions10148131448
loadScripts13311136175117414661751
setupStore30689254689
WebpackStandard HomeuiStartup16191451208712916691923
load13791219180710114281591
domContentLoaded13791218180710114281591
domInteractive1123247178108374
firstPaint------
backgroundConnect49231862554103
firstReactRender2922141132940
getState84606815
initialActions6117519412
loadScripts1347119817809913891541
setupStore15774121450
WebpackPower User HomeuiStartup28612373369141332633691
load16671384240427918192404
domContentLoaded16661384240327918192403
domInteractive18263946209192946
firstPaint------
backgroundConnect16846472135279472
firstReactRender412880134680
getState1247919731140197
initialActions9144111044
loadScripts16001341237225417362372
setupStore3251303040130
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 172 Bytes (0%)
  • common: 10 Bytes (0%)

@seaona seaona added flaky tests no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed labels Oct 29, 2025
@github-actions github-actions bot added size-M and removed size-S labels Oct 29, 2025
@metamaskbot
Copy link
Collaborator

📊 Page Load Benchmark Results

Current Commit: aefda6e | Date: 10/29/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.03s (±42ms) 🟡 | historical mean value: 1.06s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 716ms (±38ms) 🟢 | historical mean value: 744ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 76ms (±11ms) 🟢 | historical mean value: 83ms ⬇️ (historical data)
📈 Detailed Results
Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.03s 42ms 1000ms 1.33s 1.07s 1.33s
domContentLoaded 716ms 38ms 691ms 993ms 753ms 993ms
firstPaint 76ms 11ms 56ms 164ms 84ms 164ms
firstContentfulPaint 76ms 11ms 56ms 164ms 84ms 164ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms

Results generated automatically by MetaMask CI

@metamaskbot
Copy link
Collaborator

Builds ready [aefda6e]
UI Startup Metrics (1302 ± 96 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup1302112915999613671465
load112196914289411781282
domContentLoaded111596414239311711275
domInteractive201358101946
firstPaint58674133445511091256
backgroundConnect2342202617239250
firstReactRender28186183146
getState1977182230
initialActions50506517
loadScripts8877371197939401051
setupStore1062021014
BrowserifyPower User HomeuiStartup22421796365458330283654
load1174932191233615841912
domContentLoaded1160928186232215751862
domInteractive281685204785
firstPaint807200190057710391900
backgroundConnect279230698111293698
firstReactRender26223332833
getState19215529140209291
initialActions825412554
loadScripts912701150229112901502
setupStore1282761327
WebpackStandard HomeuiStartup8867631214819031080
load66560597377678899
domContentLoaded65759996076672888
domInteractive16125571435
firstPaint20758893197209635
backgroundConnect26147093041
firstReactRender2816100113437
getState1263441519
initialActions4126458
loadScripts65459694774669874
setupStore1052441315
WebpackPower User HomeuiStartup14981155208728416102087
load62855192096713920
domContentLoaded60253981174687811
domInteractive18124392943
firstPaint38174724251607724
backgroundConnect10011424119106424
firstReactRender24222922529
getState1378616716140167
initialActions15175233475
loadScripts59853780472678804
setupStore25593263793
FirefoxBrowserifyStandard HomeuiStartup1369120517249614131619
load1174104713436412171273
domContentLoaded1173104713436412161273
domInteractive1023622637118201
firstPaint------
backgroundConnect372293124362
firstReactRender24195162442
getState9316017814
initialActions511921937
loadScripts1151102713196311901257
setupStore1167371120
BrowserifyPower User HomeuiStartup26172231352335928863523
load13911205166711815011667
domContentLoaded13911204166611815001666
domInteractive1578028864209288
firstPaint------
backgroundConnect17234474143319474
firstReactRender40295484754
getState1417128148162281
initialActions2311524220152
loadScripts13241182151610314491516
setupStore3671383551138
WebpackStandard HomeuiStartup16131377221513116791856
load1387119617169814471558
domContentLoaded1386119617159814471558
domInteractive1093455164112209
firstPaint------
backgroundConnect4724131215290
firstReactRender26226142733
getState10413216916
initialActions506811324
loadScripts1356117616939514211531
setupStore146182191331
WebpackPower User HomeuiStartup28942377357236431673572
load16481409196517318161965
domContentLoaded16471408196417318151964
domInteractive1679146696214466
firstPaint------
backgroundConnect20035615143296615
firstReactRender45311001651100
getState1317225038148250
initialActions13226102426
loadScripts15771375191415317011914
setupStore4971764365176
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: -21.75 KiB (-0.47%)
  • ui: 23.51 KiB (0.33%)
  • common: 23.73 KiB (0.27%)

@seaona seaona marked this pull request as ready for review October 29, 2025 13:30
Copy link
Member

@seaona seaona left a comment

Choose a reason for hiding this comment

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

LGTM

@seaona seaona enabled auto-merge October 29, 2025 13:32
@seaona seaona added this pull request to the merge queue Oct 29, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 29, 2025
@Unik0rnMaggie Unik0rnMaggie added this pull request to the merge queue Oct 29, 2025
Merged via the queue into main with commit 6ed6acf Oct 29, 2025
185 of 187 checks passed
@Unik0rnMaggie Unik0rnMaggie deleted the flaky-wallet-created-events branch October 29, 2025 15:28
@github-actions github-actions bot locked and limited conversation to collaborators Oct 29, 2025
@metamaskbot metamaskbot added the release-13.8.0 Issue or pull request that will be included in release 13.8.0 label Oct 29, 2025
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.8.0 Issue or pull request that will be included in release 13.8.0 size-M team-qa QA team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants