Needs work
Project:
Drupal core
Version:
main
Component:
Admin theme
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
20 Aug 2026 at 02:35 UTC
Updated:
24 Sep 2026 at 11:12 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
kentr commentedI added a FunctionalJavascript test in #3619127: Forms sidebar doesn't open with error links from Inline Form Errors module that operates the advanced sidebar on node edit forms with the Navigation module enabled.
Comment #3
kentr commentedFTR the theme does have some tests already.
Comment #4
kentr commentedI'm adding a functional JS test for vertical tabs in #3604037: Indicate that grouping elements have child element errors for UX and a11y.
I saw that #3582093: Convert Unit and Kernel tests that use Claro to Admin adds a kernel test for vertical tabs, but since Default Admin has a JS theme function (that #3604037: Indicate that grouping elements have child element errors for UX and a11y is currently breaking), a JS test would be good also.
Comment #5
gábor hojtsyDo we know more specifics on what exactly do we need tests on?
Comment #6
jurgenhaas@gábor hojtsy I have added a broad list of required tests in the IS and intend to start working on the first two just now.
Comment #8
jurgenhaasThe first MR covers kernel and functional tests. Building them also discovered 3 bugs in the theme that I resolved too as part of the same MR. The one failing test is a random one that also sometimes fails elsewhere.
There are a few more issues that I found:
PreprocessHooks::lazyToolbarUserPicture()callstoolbarUserPicture(), which does not exist; there is notoolbar_user_picturetheme hook in core.PreprocessHooks::preprocessBlockContentAddList()andtemplates/admin/block-content-add-list.html.twigtarget theblock_content_add_listtheme hook, which no longer exists;/block/addrendersentity_add_list.Settings::overriddenSettingByUser()builds the warning as a plain string, so Twig escapes the markup.Settings::setAll()andclear()dereference a NULLuserDataafter the fallback.Helper::isActive()returns early without caching.templates/system/system-themes-page.html.twigemits the<h3>idtwice.FormHooks::formAfterBuild()setsdata-sticky-form-selectorto an already prefixed value.FormHooks::formSystemModulesAlter()sets#module_package_listing, which nodefault_admintemplate reads.Helper::isContentForm()reads an unsetcallback_objectfor aFormStatewithout a form object.defaultAdminAutocompleteTest.jsis tagged onlycore;AdminBlockFilterTestis grouped onlyblock;FileFieldWidgetAdminThemeTesthas a stale@see AdminHooks->fileAndImageWidgetHelper().Shall we address them here as well? I would recommend this in light of the tight schedule.
Comment #9
mherchelFrom the IS:
I don't believe core has the capability to do visual regression tests. I vibed a DDEV plugin that can do it at https://github.com/mherchel/ddev-drupal-admin-vrt. But even to get decent coverage I have to install https://www.drupal.org/project/theming_tools and https://www.drupal.org/project/form_style. I don't know if it's feasible to add this to core (and it's definitely out of scope of this issue)
Comment #10
gábor hojtsyComment #11
gábor hojtsyComment #12
jurgenhaasOK, this is now ready for review. Just saw that @gábor hojtsy has already changed the status accordingly, which is fine. I went through it myself once again this morning, and it looks good to me.
Please bear in mind, this is the first time I wrote such comprehensive tests, and I may have overreached. On the other hand, getting too much with tests is almost never possible. But yes, I have used AI to get this done, still it took me almost 3 full days.
Comment #13
quietone commentedI skimmed through about half of the comments and made my own some comments. Overall what I read was clear and easy to understand, also concise. All good things.
(At nearly 10,000 lines of code this is overwhelming and taxing).
Comment #14
longwaveThis MR is way too large to review. There are several removals and changes at the top that don't seem related to tests. Then when I started looking at the tests a lot of them are very tightly coupled to the implementation - unit testing that a hook implementation adds a specific key to a form somewhere isn't really very useful, integration type tests that test the end result of the full page feel like a better option.
> getting too much with tests is almost never possible
I disagree. If your tests are tightly coupled to your implementation then it all becomes brittle; changing anything about the implementation means you also have to change the tests to match, and that shouldn't have to be the case.
Comment #15
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.