Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
phpunit
Priority:
Critical
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
25 Mar 2025 at 22:57 UTC
Updated:
19 Aug 2026 at 12:10 UTC
Jump to comment: Most recent
We're currently pinned to selenium/standalone-chrome:127, yet the latest version of Chrome is 134. #3471113: Update to selenium/standalone-chrome:134+ seems to require many tests to be updated, so let's update to 133 first, then tackle 134+ afterwards.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
mstrelan commentedThe fails here are all due to resizing the browser. It seems in 128+ the
window.innerHeightis always 139px less than the height you resize to. I tried to debug this in non-headless mode, which was even weirder because resizing to 400px wide would set it to 500px width.It seems that the 139px includes the browser chrome (toolbar, infobar, etc), but I'm not sure if the difference is in how the
resizeWindowworks, or in how the browser reportswindow.innerHeight. Either way, usingwindow.outerHeightmakesBrowserWithJavascriptTest::testJavascriptpass.There was an option to use
--headless=oldwhich would mean we don't need to refactor any tests, but this has been removed in Chrome 132.I was able to apply the same logic to
LayoutBuilderDisableInteractionsTest::testFormsLinksDisabledand increase the height by 139px, but it seems like a bit of a hack.Tried the same approach for the Nightwatch tests but it seems like there must be something else going on there.
Comment #4
mstrelan commentedLooks like the random fails we saw in 134 are creeping back in, and we've got a green run on 134 with all the additional waits added, so maybe we should just stick with that.
Comment #5
catchNightwatch testing has not really been maintained since it was added (apart from in desperation), but there is #3467492: [policy, no patch] Replace Nightwatch with Playwright.
Comment #9
longwaveLet's try to revive this before going to an even newer version of Chrome.
Comment #10
longwaveThe last three fails pass locally now.
Comment #12
longwave133 is green, trying 144 (latest) in a separate MR.
Comment #13
smustgrave commentedSorry, try to get to criticals early but this one fell through. Appears to need a rebase
Comment #15
mstrelan commentedLet's keep this for 133 only and focus on newer versions in #3471113: Update to selenium/standalone-chrome:134+. There are a couple open issues for 134+ at https://issues.chromium.org/issues/405607581 and https://issues.chromium.org/issues/402796660.
I've hidden the 144 branch and rebased 133. It's failing on two SettingsTray tests, that I think are already flakey in main.
Comment #16
quietone commentedThe failing test is Drupal\Tests\settings_tray\FunctionalJavascript\SettingsTrayBlockFormTest::testValidationMessages().
The output of the test includes:
Warning: Undefined array key "#type" in Drupal\olivero\Hook\OliveroHooks->preprocessInput() (line 226 of core/themes/olivero/src/Hook/OliveroHooks.php).which is fixed by adding 'search_node' to the list of installed modules. But the test still fails.
Comment #17
quietone commentedAccording to git bisect, #3568566: Olivero's secondary menus inoperable when authenticated & BigPipe present is the issue that broke the test. That was back in Feb of this year.
Comment #18
longwaveGood find on #3568566: Olivero's secondary menus inoperable when authenticated & BigPipe present. Turns out this is a bug in that change.
secondLevelNavMenusis undefined untilinit()populates it - but if the primary menu is empty then it is never populated. In turn this is only uncovered here because Chrome 133 fires resize events that older Chrome didn't, which causes the error. So the fix is trivial - just initialise the variable to an empty array instead of undefined.Claude Code helped with this debugging session.
Comment #19
longwaveLooks like this is also the fix for #3584314: Mobile menu doesn't close by ESC key with search block + empty main menu
Comment #20
smustgrave commentedLet do it! On a work project we ran into major problems being on an old chrome version so glad to see we are keeping up.
Comment #22
catchCommitted/pushed to main, thanks!
Will need a backport MR for 11.x - just gitlab-ci.yml conflicts though.
Comment #24
mstrelan commented11.x backport
Comment #25
smustgrave commentedSeems like a good backport.
As noted in slack though this update seemed to increase the number of randoms. Which is odd because my experience upgrading selenium at work it addressed failures that's what I was hoping for at least.
Comment #27
longwaveCommitted and pushed 7a4b1cb6be0 to 11.x. Thanks!
Comment #29
smustgrave commentedThink this one got stuck in RTBC queue so seeing if a new comment shakes it loose
Edit: It did!