Skip to content

Conversation

@Prithpal-Sooriya
Copy link
Contributor

@Prithpal-Sooriya Prithpal-Sooriya commented Dec 1, 2025

Description

adding driver delay as these tests rely on snap balances which are async

Open in GitHub Codespaces

Changelog

CHANGELOG entry: null

Related issues

Fixes: #37824, https://consensyssoftware.atlassian.net/browse/ASSETS-1809

Manual testing steps

N/A

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

Re-enables previously skipped Solana E2E tests and adds short driver delays to stabilize async balance and activity assertions.

  • Tests (Solana E2E):
    • Re-enabled suites:
      • test/e2e/tests/send/send-solana.spec.ts
      • test/e2e/tests/solana/send-flow.spec.ts
      • test/e2e/tests/solana/transaction-activity-list.spec.ts
      • Unskips non-zero balance cases in test/e2e/tests/solana/check-balance.spec.ts.
    • Stability improvements:
      • Insert await driver.delay(5000) before balance checks, activity assertions, and send flows to wait for snap-driven async data (e.g., in check-balance.spec.ts, send-solana.spec.ts, send-flow.spec.ts, transaction-activity-list.spec.ts).
    • Minor test flow tweaks:
      • Ensure asset page is ready by waiting for 50 SOL before proceeding in send-solana.spec.ts.

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

adding driver delay as these tests rely on snap balances which are async
@github-actions
Copy link
Contributor

github-actions bot commented Dec 1, 2025

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
Copy link
Collaborator

Builds ready [4cf490a]
UI Startup Metrics (1228 ± 102 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyStandard HomeuiStartup12281006155910212821409
load102685113239110751216
domContentLoaded102084613189010681207
domInteractive2615162222281
firstPaint5209013053999971161
backgroundConnect21319624511218241
firstReactRender2919151153050
getState3315108173775
initialActions106112
loadScripts8146551120888571004
setupStore1174051220
numNetworkReqs1257720572
BrowserifyPower User HomeuiStartup20291664267822721022538
load100588314551289991333
domContentLoaded99087314471279771314
domInteractive34161483030127
firstPaint5559114003999441286
backgroundConnect266203684114233544
firstReactRender61381191962109
getState18712768274192229
initialActions104112
loadScripts78367412381277721112
setupStore1987892433
numNetworkReqs103642835597273
WebpackStandard HomeuiStartup775667102070801944
load60554384369625778
domContentLoaded60053883568622772
domInteractive2514109222189
firstPaint24365845178216632
backgroundConnect952341117
firstReactRender26194363036
getState23125492941
initialActions105111
loadScripts59853682667621765
setupStore1054451217
numNetworkReqs1257820574
WebpackPower User HomeuiStartup16971336294330720192236
load6926001315107692948
domContentLoaded6815941309108680944
domInteractive38191983235126
firstPaint275103971192261714
backgroundConnect69765915620589
firstReactRender63489096881
getState200131781108190249
initialActions105112
loadScripts6785921297105677935
setupStore221057112449
numNetworkReqs1716442287219397
FirefoxBrowserifyStandard HomeuiStartup12871063170413813671594
load105691412788511081214
domContentLoaded105591312788511081214
domInteractive53301352576104
firstPaint------
backgroundConnect44211993045108
firstReactRender23184952335
getState126197191023
initialActions102022
loadScripts102889312597510801163
setupStore13590121335
numNetworkReqs1156515659
BrowserifyPower User HomeuiStartup26262059430946626714081
load12121037264623012481498
domContentLoaded12121037264523012481498
domInteractive1133356287108339
firstPaint------
backgroundConnect1144158788120279
firstReactRender6137119186599
getState27525961210378758
initialActions217123
loadScripts1172961262620412011456
setupStore1809767205231691
numNetworkReqs996330151103229
WebpackStandard HomeuiStartup15131285189415016431785
load12411073156610713131445
domContentLoaded12411073156510713131445
domInteractive57281433380128
firstPaint------
backgroundConnect47181702949114
firstReactRender26196662834
getState12688101326
initialActions204134
loadScripts12141055144710212861383
setupStore14689141340
numNetworkReqs1256617764
WebpackPower User HomeuiStartup29312206520260830014321
load15101228283438015312589
domContentLoaded15091228283338015312589
domInteractive12533965141106474
firstPaint------
backgroundConnect147291068170153407
firstReactRender67422423067136
getState24582961202344788
initialActions4160938
loadScripts14511203268631814892440
setupStore20391022224288705
numNetworkReqs102592526179240
📊 Page Load Benchmark Results

Current Commit: 4cf490a | Date: 12/1/2025

📄 Localhost MetaMask Test Dapp

Samples: 100

Summary

  • pageLoadTime-> current mean value: 1.04s (±39ms) 🟡 | historical mean value: 1.04s ⬇️ (historical data)
  • domContentLoaded-> current mean value: 722ms (±36ms) 🟢 | historical mean value: 727ms ⬇️ (historical data)
  • firstContentfulPaint-> current mean value: 77ms (±12ms) 🟢 | historical mean value: 80ms ⬇️ (historical data)

📈 Detailed Results

Metric Mean Std Dev Min Max P95 P99
pageLoadTime 1.04s 39ms 1.01s 1.31s 1.07s 1.31s
domContentLoaded 722ms 36ms 701ms 975ms 751ms 975ms
firstPaint 77ms 12ms 60ms 180ms 92ms 180ms
firstContentfulPaint 77ms 12ms 60ms 180ms 92ms 180ms
largestContentfulPaint 0ms 0ms 0ms 0ms 0ms 0ms
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 58 Bytes (0%)
  • ui: 13 Bytes (0%)
  • common: 20 Bytes (0%)

@Prithpal-Sooriya Prithpal-Sooriya marked this pull request as ready for review December 2, 2025 16:40
driver,
);

await driver.delay(5000);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would like QA thoughts on this.
These tests do pass, but balances are async and require a little bit of time to load (even if the API requests are mocked)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

NOTE, that these tests for solana are with the BIP-44 state flag set to 0 - BIP-44 is not enabled).

If BIP-44 is enabled, it would require a much larger UI change for these e2e tests to pass. Example changes:

  1. solana is added directly into each account, so there is no need to add a solana account.
  2. the home screen will show an aggregated balance across EVM and non-EVM.

@Prithpal-Sooriya Prithpal-Sooriya added the no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed label Dec 2, 2025
Copy link

@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.

Bug: Missing delay in similar non-zero balance test

The test "full flow of USD with a positive balance account" is missing the driver.delay(5000) that was added to "full flow of SOL with a positive balance account" at line 201. Both tests have identical configurations (showNativeTokenAsMainBalance: true, mockGetTransactionSuccess: true) and expect a non-zero balance of '50'. If async balance loading requires a delay for the SOL test before checkPageIsLoaded('50'), the USD test with the same setup likely needs it too, otherwise it may be flaky.

test/e2e/tests/solana/send-flow.spec.ts#L64-L75

it('full flow of USD with a positive balance account', async function () {
this.timeout(120000);
await withSolanaAccountSnap(
{
title: this.test?.fullTitle(),
showNativeTokenAsMainBalance: true,
mockGetTransactionSuccess: true,
},
async (driver) => {
const homePage = new NonEvmHomepage(driver);
await homePage.checkPageIsLoaded('50');

test/e2e/tests/solana/send-flow.spec.ts#L200-L203

async (driver) => {
await driver.delay(5000);
const homePage = new NonEvmHomepage(driver);
await homePage.checkPageIsLoaded('50');

Fix in Cursor Fix in Web


Bug: Missing delay before identical balance check method call

The "and transaction fails" test in send-flow.spec.ts calls checkGetBalance('50', 'SOL') without a delay before it, while the nearly identical "For a non 0 balance account - SOL balance" test in check-balance.spec.ts has driver.delay(5000) added before the same call. Both tests have showNativeTokenAsMainBalance: true and default non-zero balance configuration. If async balance loading requires a delay before this assertion in one file, it likely requires it in the other as well.

test/e2e/tests/solana/send-flow.spec.ts#L317-L320

},
async (driver) => {
const homePage = new NonEvmHomepage(driver);
await homePage.checkGetBalance('50', 'SOL');

test/e2e/tests/solana/check-balance.spec.ts#L108-L110

const homePage = new NonEvmHomepage(driver);
await driver.delay(5000);
await homePage.checkGetBalance('50', 'SOL');

Fix in Cursor Fix in Web


@Prithpal-Sooriya Prithpal-Sooriya marked this pull request as draft December 2, 2025 16:49
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-S team-assets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: With BIP44 turned on mocking Solana network responses no longer works

3 participants