Issue #3549068 by aryan singh, dydave, ressa: Added modules configuration...
https://www.drupal.org/project/admin_toolbar/issues/3549068
Admin Toolbar Search: Added modules configuration links to search suggestions.
Based on MR !182 (closed) and the work of @aryan_singh.
Based on MR !210 (closed) and the work of @MukhtarM.
Summary of the changes to improve test coverage for the module-configuration-links feature:
New fixture test modules (admin_toolbar_search/tests/modules/)
admin_toolbar_search_test– has aconfigurekey with an accessible route gated by its own custom permission (access admin toolbar search test).admin_toolbar_search_test_restricted– same idea, but installed dynamically mid-test to exercise cache/module-list invalidation on install.admin_toolbar_search_test_invalid_route–configurekey points at a route name that is never defined, to test graceful handling of bad/missing routes.
New test class: AdminToolbarSearchModuleConfigLinksTest.php
testModuleConfigurationLinkVisibleWithPermission– confirms a module is found by its name (not just path), mirroring the original Glossify issue, and that the link points to the correctconfigureroute.testModuleConfigurationLinkHiddenWithoutPermission– confirms$url->access()is respected: an enabled module with aconfigurekey is not exposed to users lacking access to that route.testInvalidConfigureRouteIsSkippedGracefully– confirms a module whoseconfigurekey references a non-existent route doesn't cause an error and is simply skipped (routeExists()coverage).testNewlyInstalledModuleLinkAppearsAfterInstall– installs a module mid-test and asserts its link is absent before and present after, verifying theconfig:core.extensioncache tag invalidation and theModuleExtensionList::reset()re-scan actually work together, without manual cache clearing.
Edited by David Suissa