Skip to content

Conversation

@Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Jul 31, 2025

Description

Our E2E driver class now allows the methods switchWindow and switchToWindowWithTitle methods to be used in tests that have the WebSocket connection to the background process disabled (such as those that use a production build, or those that involve the extension resetting).

Previously the switchToWindowWithTitleWithoutSocket driver method served this purpose, but the test author had to know to use this alternative method. Plus it didn't allow switching to a window handle, or any of the other switch methods that internally use switchWindow.

There are a couple of switch methods still not supported, but in these cases an error will be thrown so that the failure reason will be clear.

Open in GitHub Codespaces

Changelog

CHANGELOG entry: null

Related issues

This unblocks #31435

Manual testing steps

N/A

Screenshots/Recordings

N/A

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.

@metamaskbot
Copy link
Collaborator

✨ Files requiring CODEOWNER review ✨

👨‍🔧 @MetaMask/qa (1 files, +4 -1)
  • 📁 test/
    • 📁 e2e/
      • 📄 helpers.js +4 -1


while (timeElapsed <= this.timeout) {
for (const handle of windowHandles) {
// Wait 25 x 200ms = 5 seconds for the title to match the target title
Copy link
Member Author

@Gudahtt Gudahtt Jul 31, 2025

Choose a reason for hiding this comment

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

The implementation I went with here for the non-socket-based "find window with title" code was based on the version we used prior to the WebSocket connection to the background:

async switchToWindowWithTitle(

It seemed a bit nicer than the switchToWindowByTitleWithoutSocket implementation. Though I did opt for the delay and retry settings from switchToWindowByTitleWithoutSocket, as they seemed more reasonable (25 retries with 200ms delay versus 8 retries with 2500ms delay. 2500 is way too long a delay)

@Gudahtt Gudahtt changed the title test: Support window switching without mocha server test: Support window switching without WebSocket background connection Jul 31, 2025
@Gudahtt Gudahtt force-pushed the allow-switch-window-driver-methods-without-background-mocha-server branch from 30737d1 to 31e14ca Compare July 31, 2025 20:20
@metamaskbot
Copy link
Collaborator

Builds ready [31e14ca]
UI Startup Metrics (1227 ± 58 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1227111114565812571304
load105296712795110751116
domContentLoaded104595612705110691111
domInteractive18135271739
firstPaint648113122941610481082
backgroundConnect2202092689223235
firstReactRender20155362033
getState1144171426
initialActions30406312
loadScripts831753101047858897
setupStore74163714
WebpackHomeuiStartup23391789272917124392646
load18751322235218719552267
domContentLoaded18581317226216919512104
domInteractive1911124201369
firstPaint1616433856186280
backgroundConnect59133018931295
firstReactRender1378933246164193
getState154259351225
initialActions621981958
loadScripts18541314225116819492101
setupStore206252411353
FirefoxBrowserifyHomeuiStartup14591189188412615291704
load12611039161210413251444
domContentLoaded12611038161210413251443
domInteractive1063431654115206
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2815173182954
firstReactRender26206162741
getState827612637
initialActions40478216
loadScripts12401023158910213011424
setupStore837910625
WebpackHomeuiStartup16081436190812416901855
load13541200161910614331557
domContentLoaded13541200161910614331557
domInteractive913225045102238
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect32197793349
firstReactRender53427265662
getState824271123
initialActions51538521
loadScripts13301175157910414101533
setupStore95345821
Benchmark value 221 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 4 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 832 exceeds gate value 830 for chrome browserify home mean loadScripts
Benchmark value 235 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 12 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 2340 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 1876 exceeds gate value 1711 for chrome webpack home mean load
Benchmark value 1859 exceeds gate value 1704 for chrome webpack home mean domContentLoaded
Benchmark value 59 exceeds gate value 40 for chrome webpack home mean backgroundConnect
Benchmark value 1854 exceeds gate value 1699 for chrome webpack home mean loadScripts
Benchmark value 2647 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 2268 exceeds gate value 2030 for chrome webpack home p95 load
Benchmark value 2105 exceeds gate value 2005 for chrome webpack home p95 domContentLoaded
Benchmark value 70 exceeds gate value 57 for chrome webpack home p95 domInteractive
Benchmark value 296 exceeds gate value 90 for chrome webpack home p95 backgroundConnect
Benchmark value 8 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 2101 exceeds gate value 1970 for chrome webpack home p95 loadScripts
Benchmark value 1460 exceeds gate value 1405 for firefox browserify home mean uiStartup
Benchmark value 1262 exceeds gate value 1245 for firefox browserify home mean load
Benchmark value 1261 exceeds gate value 1239 for firefox browserify home mean domContentLoaded
Benchmark value 28 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 26 exceeds gate value 25 for firefox browserify home mean firstReactRender
Benchmark value 4 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 1240 exceeds gate value 1230 for firefox browserify home mean loadScripts
Benchmark value 1704 exceeds gate value 1660 for firefox browserify home p95 uiStartup
Benchmark value 206 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 37 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 16 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 32 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 54 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 6 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 238 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 62 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 21 exceeds gate value 2 for firefox webpack home p95 initialActions
Sum of mean exceeds: 996ms | Sum of p95 exceeds: 1304.8ms
Sum of all benchmark exceeds: 2300.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 43 Bytes (0%)
  • ui: 1.2 KiB (0.02%)
  • common: 15 Bytes (0%)

@Gudahtt Gudahtt force-pushed the allow-switch-window-driver-methods-without-background-mocha-server branch from 31e14ca to 8d2edc3 Compare August 1, 2025 18:19
@metamaskbot
Copy link
Collaborator

Builds ready [8d2edc3]
UI Startup Metrics (1154 ± 77 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1154104916717711891242
load97887215137510131067
domContentLoaded97086614937510051059
domInteractive18144961734
firstPaint56910314983919751037
backgroundConnect22320570149223237
firstReactRender20144052130
getState11385121230
initialActions40648312
loadScripts75565291254794829
setupStore74132710
WebpackHomeuiStartup22021675261719022982560
load16581234195315317251893
domContentLoaded16521230193715217201884
domInteractive171188151466
firstPaint1635844666195299
backgroundConnect241378102839
firstReactRender20291395110348388
getState184275451128
initialActions5232468
loadScripts16481228192615017171873
setupStore2762936114264
FirefoxBrowserifyHomeuiStartup1373118416769714441518
load1186103713878412581319
domContentLoaded1186103713878412581319
domInteractive1033425747119219
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3016105183074
firstReactRender26216082552
getState9217518629
initialActions30345312
loadScripts1160102113708612291302
setupStore73528631
WebpackHomeuiStartup15641357208513716211868
load13081142165111113691536
domContentLoaded13081141165011113691535
domInteractive97322885394253
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3118185213271
firstReactRender51427165562
getState8212414628
initialActions4010410211
loadScripts12841124156810713481514
setupStore949710718
Benchmark value 224 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 4 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 238 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 12 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 2203 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 2561 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 66 exceeds gate value 57 for chrome webpack home p95 domInteractive
Benchmark value 388 exceeds gate value 370 for chrome webpack home p95 firstReactRender
Benchmark value 8 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 264 exceeds gate value 65 for chrome webpack home p95 setupStore
Benchmark value 31 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 26 exceeds gate value 25 for firefox browserify home mean firstReactRender
Benchmark value 4 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 219 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 74 exceeds gate value 70 for firefox browserify home p95 backgroundConnect
Benchmark value 29 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 12 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 31 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 32 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 51 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 4 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 253 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 71 exceeds gate value 49 for firefox webpack home p95 backgroundConnect
Benchmark value 62 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 11 exceeds gate value 2 for firefox webpack home p95 initialActions
Sum of mean exceeds: 260ms | Sum of p95 exceeds: 751.8ms
Sum of all benchmark exceeds: 1011.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 43 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 10 Bytes (0%)

Our E2E driver class now allows the methods `switchWindow` and
`switchToWindowWithTitle` methods to be used in tests that have the
Mocha background server disabled (such as those that use a production
build, or those that involve the extension resetting).

Previously the `switchToWindowWithTitleWithoutSocket` driver method
served this purpose, but the test author had to know to use this
alternative method. Plus it didn't allow switching to a window handle,
or any of the other switch methods that internally use `switchWindow`.

There are a couple of switch methods still not supported, but in these
cases an error will be thrown so that the failure reason will be clear.

This unblocks #31435
@Gudahtt Gudahtt force-pushed the allow-switch-window-driver-methods-without-background-mocha-server branch from 8d2edc3 to 1c69941 Compare August 1, 2025 20:34
@metamaskbot
Copy link
Collaborator

Builds ready [1c69941]
UI Startup Metrics (1142 ± 60 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1142103913296011751256
load97186511345610081071
domContentLoaded96486111265710021065
domInteractive16133741623
firstPaint58913011313869761042
backgroundConnect2172052387221231
firstReactRender20143742129
getState1033061323
initialActions2013219
loadScripts75465590657795854
setupStore73454711
WebpackHomeuiStartup21641661260019822732475
load16161250195415816801864
domContentLoaded16091242193715716721843
domInteractive1711106161361
firstPaint1666139463201285
backgroundConnect2714329322952
firstReactRender22589409121379389
getState3243167611285
initialActions52314611
loadScripts16051236192515516691839
setupStore206301471328
FirefoxBrowserifyHomeuiStartup13201156176210813891503
load113299613547611861259
domContentLoaded113299613537611861259
domInteractive973525445100213
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3015114163070
firstReactRender26205892652
getState828613637
initialActions30193211
loadScripts110998313377611641241
setupStore10316318645
WebpackHomeuiStartup15721380192213116431841
load13161153158710013731527
domContentLoaded13161153158610013731526
domInteractive97322785395253
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect3116117183176
firstReactRender51427365564
getState10216319738
initialActions5011513216
loadScripts12921135156410113531504
setupStore9412713725
Benchmark value 217 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 2 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 231 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 9 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 32 exceeds gate value 29 for chrome webpack home mean getState
Benchmark value 2475 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 61 exceeds gate value 57 for chrome webpack home p95 domInteractive
Benchmark value 389 exceeds gate value 370 for chrome webpack home p95 firstReactRender
Benchmark value 285 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 11 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 30 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 27 exceeds gate value 25 for firefox browserify home mean firstReactRender
Benchmark value 3 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 10 exceeds gate value 9 for firefox browserify home mean setupStore
Benchmark value 213 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 37 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 11 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 45 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 31 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 52 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 5 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 253 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 76 exceeds gate value 49 for firefox webpack home p95 backgroundConnect
Benchmark value 64 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 38 exceeds gate value 32 for firefox webpack home p95 getState
Benchmark value 16 exceeds gate value 2 for firefox webpack home p95 initialActions
Sum of mean exceeds: 244ms | Sum of p95 exceeds: 574.8ms
Sum of all benchmark exceeds: 818.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 43 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 10 Bytes (0%)

@Gudahtt Gudahtt marked this pull request as ready for review August 1, 2025 21:59
@Gudahtt Gudahtt requested a review from a team as a code owner August 1, 2025 21:59
@Gudahtt Gudahtt requested a review from HowardBraham August 1, 2025 21:59
@github-project-automation github-project-automation bot moved this to Needs dev review in PR review queue Aug 1, 2025
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@metamaskbot
Copy link
Collaborator

Builds ready [d55acc1]
UI Startup Metrics (1142 ± 65 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1142102513896511691281
load9588421133659971083
domContentLoaded9508351119669911076
domInteractive16133951725
firstPaint6537811133699731030
backgroundConnect2142002387218227
firstReactRender2314112132449
getState11379111326
initialActions30506315
loadScripts74362790766783869
setupStore74254816
WebpackHomeuiStartup21681631261521222932519
load16251190199617917201900
domContentLoaded16181186199217717131897
domInteractive171182141459
firstPaint1695841361198300
backgroundConnect3114322423056
firstReactRender21190401110347389
getState2443106012253
initialActions5235469
loadScripts16141184198117517101894
setupStore206266441628
FirefoxBrowserifyHomeuiStartup13141141182711613631459
load1135100114568311971294
domContentLoaded1134100114568311971294
domInteractive1003434156104243
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect251596132653
firstReactRender24205572351
getState62537524
initialActions5015517229
loadScripts111498614348411781277
setupStore83458632
WebpackHomeuiStartup15551367190512716541792
load13071135164911013761501
domContentLoaded13071135164911013761501
domInteractive1003128056100254
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect25166582939
firstReactRender51418985667
getState62406614
initialActions31314311
loadScripts12861113162711013561481
setupStore10512014737
Benchmark value 215 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 24 exceeds gate value 23 for chrome browserify home mean firstReactRender
Benchmark value 4 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 228 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 49 exceeds gate value 45 for chrome browserify home p95 firstReactRender
Benchmark value 15 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 2519 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 59 exceeds gate value 57 for chrome webpack home p95 domInteractive
Benchmark value 389 exceeds gate value 370 for chrome webpack home p95 firstReactRender
Benchmark value 253 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 9 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 26 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 6 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 243 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 29 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 32 exceeds gate value 27 for firefox browserify home p95 setupStore
Benchmark value 101 exceeds gate value 100 for firefox webpack home mean domInteractive
Benchmark value 52 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 3 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 254 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 67 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 11 exceeds gate value 2 for firefox webpack home p95 initialActions
Benchmark value 37 exceeds gate value 28 for firefox webpack home p95 setupStore
Sum of mean exceeds: 232ms | Sum of p95 exceeds: 586.8ms
Sum of all benchmark exceeds: 818.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 43 Bytes (0%)
  • ui: 0 Bytes (0%)
  • common: 10 Bytes (0%)

@HowardBraham
Copy link
Contributor

@Gudahtt I would rather approach this as changing the WindowHandles class to allow it working without a WebSocket, instead of having driver.js sometimes have this.windowHandles and sometimes not.

@Gudahtt
Copy link
Member Author

Gudahtt commented Aug 4, 2025

Could you elaborate on why? I found the operations easier to understand as operations just with the Selenium Webdriver. To put them inside the WindowsHandles class would make them harder to find.

Also it's not totally clear to me what WindowHandles should be responsible for, apart from as a provider of window operations that utilize both the driver and the background connection. If we were to move these operations there, I'm unsure how I'd describe its responsibilities/purpose.

@metamaskbot
Copy link
Collaborator

Builds ready [fc1081d]
UI Startup Metrics (1173 ± 73 ms)
PlatformBuildTypePageMetricMean (ms)Min (ms)Max (ms)Std Dev (ms)P 75 (ms)P 95 (ms)
ChromeBrowserifyHomeuiStartup1173102413187312221293
load99987511316410441109
domContentLoaded99286811236410381102
domInteractive1813127121727
firstPaint650161110738710011078
backgroundConnect2172032447221229
firstReactRender20135162131
getState943071128
initialActions30255214
loadScripts78266391662827895
setupStore74172712
WebpackHomeuiStartup23001755276619524202632
load17161249203916818051954
domContentLoaded17081244201616617991946
domInteractive1812107151551
firstPaint1706261275190311
backgroundConnect291596153164
firstReactRender22395406108369396
getState2753145914244
initialActions9217424619
loadScripts17041241200416517941943
setupStore217310431733
FirefoxBrowserifyHomeuiStartup13031128172611313691520
load112398614118211851267
domContentLoaded112398514118211851267
domInteractive993328154104253
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect2715241252644
firstReactRender25205692451
getState9219522529
initialActions30406215
loadScripts110397213228011691252
setupStore836310627
WebpackHomeuiStartup15971349231617016601934
load13321144182713413861600
domContentLoaded13321144182613413861600
domInteractive973530044106210
firstPaintNaNNaNNaNNaNNaNNaN
backgroundConnect34161262332100
firstReactRender53407775768
getState826210829
initialActions40385315
loadScripts13041127179712913611576
setupStore12420223934
Benchmark value 217 exceeds gate value 10 for chrome browserify home mean backgroundConnect
Benchmark value 3 exceeds gate value 1 for chrome browserify home mean initialActions
Benchmark value 229 exceeds gate value 18 for chrome browserify home p95 backgroundConnect
Benchmark value 14 exceeds gate value 1.2 for chrome browserify home p95 initialActions
Benchmark value 2301 exceeds gate value 2192 for chrome webpack home mean uiStartup
Benchmark value 1716 exceeds gate value 1711 for chrome webpack home mean load
Benchmark value 1709 exceeds gate value 1704 for chrome webpack home mean domContentLoaded
Benchmark value 9 exceeds gate value 7 for chrome webpack home mean initialActions
Benchmark value 1704 exceeds gate value 1699 for chrome webpack home mean loadScripts
Benchmark value 2633 exceeds gate value 2454 for chrome webpack home p95 uiStartup
Benchmark value 396 exceeds gate value 370 for chrome webpack home p95 firstReactRender
Benchmark value 244 exceeds gate value 195 for chrome webpack home p95 getState
Benchmark value 19 exceeds gate value 7 for chrome webpack home p95 initialActions
Benchmark value 27 exceeds gate value 25 for firefox browserify home mean backgroundConnect
Benchmark value 26 exceeds gate value 25 for firefox browserify home mean firstReactRender
Benchmark value 4 exceeds gate value 1 for firefox browserify home mean initialActions
Benchmark value 253 exceeds gate value 195 for firefox browserify home p95 domInteractive
Benchmark value 29 exceeds gate value 24 for firefox browserify home p95 getState
Benchmark value 15 exceeds gate value 2 for firefox browserify home p95 initialActions
Benchmark value 34 exceeds gate value 26 for firefox webpack home mean backgroundConnect
Benchmark value 53 exceeds gate value 38 for firefox webpack home mean firstReactRender
Benchmark value 4 exceeds gate value 1 for firefox webpack home mean initialActions
Benchmark value 210 exceeds gate value 156 for firefox webpack home p95 domInteractive
Benchmark value 100 exceeds gate value 49 for firefox webpack home p95 backgroundConnect
Benchmark value 68 exceeds gate value 50 for firefox webpack home p95 firstReactRender
Benchmark value 15 exceeds gate value 2 for firefox webpack home p95 initialActions
Benchmark value 34 exceeds gate value 28 for firefox webpack home p95 setupStore
Sum of mean exceeds: 367ms | Sum of p95 exceeds: 707.8ms
Sum of all benchmark exceeds: 1074.8ms

Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 166 Bytes (0%)
  • ui: 150 Bytes (0%)
  • common: 10 Bytes (0%)

@HowardBraham
Copy link
Contributor

If we were to move these operations there, I'm unsure how I'd describe its responsibilities/purpose.

I looked at it in more detail, and I think I would move all window-related commands into the class and maybe rename it WindowSwitcher. Also I realized it's a little confusing that both of these exist:

  • this.windowHandles = new WindowHandles(this.driver);
  • let windowHandles = await this.driver.getAllWindowHandles();

If I get some time, maybe I'll do this later.

@Gudahtt
Copy link
Member Author

Gudahtt commented Aug 5, 2025

That sounds like a good solution to me

await driver.switchToWindowByTitleWithoutSocket(
WINDOW_TITLES.ExtensionUpdating,
);
await driver.switchToWindowWithTitle(WINDOW_TITLES.ExtensionUpdating);
Copy link
Member

Choose a reason for hiding this comment

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

that's a great improvement ty!

@github-project-automation github-project-automation bot moved this from Needs dev review to Review finalised - Ready to be merged in PR review queue Aug 6, 2025
@seaona seaona added this pull request to the merge queue Aug 6, 2025
Merged via the queue into main with commit 369bae9 Aug 6, 2025
273 of 275 checks passed
@seaona seaona deleted the allow-switch-window-driver-methods-without-background-mocha-server branch August 6, 2025 16:47
@github-actions github-actions bot locked and limited conversation to collaborators Aug 6, 2025
@gauthierpetetin gauthierpetetin added release-13.2.0 Issue or pull request that will be included in release 13.2.0 and removed release-13.3.0 labels Aug 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-13.2.0 Issue or pull request that will be included in release 13.2.0 team-wallet-framework

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

8 participants