Problem/Motivation
Move tests of Toolbar from other modules to the toolbar module.
Steps to reproduce
Proposed resolution
Aside from the moved tests this includes changing AlertsJsonFeedTest.php from a functionaljavascript test to a functional test.
- core/modules/announcements_feed/tests/src/Functional/AlertsJsonFeedTest.php
- core/modules/toolbar/tests/src/FunctionalJavascript/announcements_feeds/AccessAnnouncementTest.php
- core/modules/toolbar/tests/src/FunctionalJavascript/ckeditor5/CKEditor5ToolbarTest.php
- core/modules/toolbar/tests/src/FunctionalJavascript/layout_builder/LayoutBuilderToolbarTest.php
- core/modules/toolbar/tests/src/FunctionalJavascript/workspaces_ui/WorkspaceToolbarIntegrationTest.php
- core/modules/toolbar/tests/src/Unit/user/ToolbarLinkBuilderTest.php
Remaining tasks
Review
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
Issue fork drupal-3611750
Show commands
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:
- 3611750-11,x
changes, plain diff MR !16394
- 3611750-move-toolbar-integration
changes, plain diff MR !16353
Comments
Comment #3
quietone commentedComment #4
smustgrave commentedDisclosure used AI to come up with a grep
And found a few more tests outside the toolbar module
core/modules/config_translation/tests/src/Functional/ConfigTranslationListUiTest.php
core/modules/shortcut/tests/src/Functional/ShortcutTranslationUITest.php
core/modules/shortcut/tests/src/Functional/ConfigTranslationListUiTest.php
core/modules/shortcut/tests/src/Functional/ShortcutCacheTagsTest.php
core/modules/shortcut/tests/src/Kernel/ShortcutCacheTagsTest.php
core/modules/contextual/tests/src/FunctionalJavascript/EditModeTest.php
core/modules/workspaces/tests/src/Functional/WorkspaceTest.php
core/modules/workspaces/tests/src/Functional/WorkspaceSwitcherTest.php
core/modules/system/tests/src/Functional/Theme/ToolbarClaroOverridesTest.php
core/modules/system/tests/src/Functional/Menu/MenuAccessTest.php
core/modules/announcements_feed/tests/src/Functional/AnnouncementsCacheTest.php
core/modules/announcements_feed/tests/src/Kernel/AnnounceFetcherUserTest.php
Assuming shortcut we can ignore as it's being deprecated too but the others seem valid
Comment #5
quietone commented@smustgrave, thanks for looking at this.
The search above isn't going to provide the results we need. For two reasons that I can see, 1) they are limited to 'toolbar' in the $modules parameter and 2) they do not take into account the other issue, #3611749: Remove toolbar from tests where it is not needed.
After apply the diff from this issue and #3611749: Remove toolbar from tests where it is not needed. I started searching for "'toolbar'", using grep. Initially, modules such as jsonapi were not excluded. It was only added after checking the use of "'toolbar'" in any tests from the module. After all the checking, the result is
Those tests will require more work so will be done in a separate issue.
Comment #6
smustgrave commentedAh my mistake! That MR has been merged so I applied again and ran the same grep and got the same results as you did in #5 so believe this one is good.
Comment #7
catchCommitted/pushed to main and cherry-picked to 11.x, thanks!
Comment #12
quietone commentedThis is causing test failures on 11.x, https://git.drupalcode.org/project/drupal/-/pipelines/897597/test_report...
Comment #15
catchThere was a mistake in the test class namespace - pushed a commit to both branches to fix this.
Comment #21
quietone commentedSo, I has incorrect namespaces in 5 tests files, including an incorrect directory name. The test that should have detected those mistakes did not and I made an issue for that, #3612498: PhpUnitApiFindAllClassFilesTest not finding namespace errors.
I tried to revert but had problems locally because of recently reinstalling Debian stable. While i was doing that catch made a fix on main, then another. We finally connected in Slack which resulted in updated MR for main and a new MR for 11.x. The 11.x one is passing tests, so that is promising.
I compared the two diffs and they agree, and tests are passing on 11.x so I am setting this back to RTBC.
Comment #22
quietone commentedComment #27
catchCommitted/pushed to main and 11.x, thanks!