Problem/Motivation

Steps to reproduce

Proposed resolution

Adjust tests as needed but comment only is done in a separate issue

  1. core/modules/user/tests/src/Unit/Theme/AdminNegotiatorTest.php
  2. core/modules/block/tests/src/Kernel/ConfigActionsTest.php
  3. core/modules/contextual/tests/src/Kernel/ContextualUnitTest.php
  4. core/modules/help/tests/src/Kernel/HelpTopicsSyntaxTest.php
  5. core/modules/system/tests/src/Kernel/Theme/TwigNamespaceTest.php
  6. core/modules/views/tests/src/Kernel/Plugin/DisplayPageTest.php
  7. core/tests/Drupal/KernelTests/Core/Asset/ResolvedLibraryDefinitionsFilesMatchTest.php
  8. core/tests/Drupal/KernelTests/Core/Recipe/EntityMethodConfigActionsTest.php
  9. core/tests/Drupal/KernelTests/Core/Recipe/RecipeValidationTest.php
  10. core/tests/Drupal/KernelTests/Core/StreamWrapper/ExtensionStreamTest.php
  11. core/tests/Drupal/KernelTests/Core/Theme/ClaroVerticalTabsTest.php
  12. core/themes/default_admin/tests/src/Unit/ImplementationNameTest.php
  13. core/tests/Drupal/Tests/Core/Extension/ModuleRequiredByThemesUninstallValidatorTest.php
  14. core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php
  15. core/tests/Drupal/Tests/Core/Theme/CoreThemesAutoloadedForTestsTest.php

Other

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3582093

Command icon 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:

Comments

quietone created an issue. See original summary.

quietone’s picture

Title: [mets] Convert tests that use Claro to Admin » Convert Unit and Kernel tests that use Claro to Admin

quietone’s picture

Status: Active » Needs work

There are failures in two files. How to fix these?

Drupal\KernelTests\Core\Theme\AdminVerticalTabsTest::testVerticalTabs
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "user_role" entity type does not exist.

Why is a change of theme causing the user_role not to exist?

and

Drupal\KernelTests\Core\Asset\ResolvedLibraryDefinitionsFilesMatchTest::testCoreLibraryCompleteness
public://admin-custom.css file referenced from the default_admin/admin_custom_css library does not exist.
Failed asserting that file "public://admin-custom.css" exists.

Admin theme has this in its .libraries.yml, and of course that won't exist. Can that be deleted or does it need to be moved or .. ?

# Custom CSS

admin_custom_css:
  css:
    theme:
      public://admin-custom.css: { preprocess: false, minified: false, weight: 50 }
catch’s picture

Let's open a new issue about admin_custom_css - that looks like a Gin feature that we should not try to support in core at all, so I think we should remove the library altogether.

User role not existing, would need to debug the test probably.

daffie made their first commit to this issue’s fork.

daffie’s picture

Disclosure: I used AI to fix the failing tests.

daffie’s picture

Status: Needs work » Needs review

The Gitlab CI pipeline is now green.

quietone’s picture

quietone’s picture

Issue summary: View changes
Status: Needs review » Postponed

Actually postponed on that issue.

quietone’s picture

Status: Postponed » Needs review
quietone’s picture

Issue summary: View changes
dcam’s picture

Status: Needs review » Needs work

Setting to Needs Work for a rebase and the ResolvedLibraryDefinitionsFilesMatchTest change to be reverted.

quietone’s picture

I made the change to ResolvedLibraryDefinitionsFilesMatchTest.

Unfortunately, I have run into a problem with generating the baseline. As you will be the commits, I tried a few times hoping to figure out why what I have done locally no longer works. I haven't found out why this is happening. And with GitLab being slow and this issue not getting updated. I give up for now.

Maybe someone else will have better luck.

quietone’s picture

Status: Needs work » Needs review

OK, my problems were caused by the update of PHPStan, which has been reverted and a copy/paste error on my part that I just kept not seeing. The important thing is that tests are passing.

dcam’s picture

There are several test classes that still reference Claro found via grep and also listed in the issue summary, including the following:

  • core/modules/help/tests/src/Kernel/HelpTopicsSyntaxTest.php
  • core/modules/system/tests/src/Kernel/Theme/TwigNamespaceTest.php
  • core/tests/Drupal/Tests/Core/Extension/ModuleRequiredByThemesUninstallValidatorTest.php
  • core/tests/Drupal/Tests/Core/Theme/AjaxBasePageNegotiatorTest.php
  • core/tests/Drupal/Tests/Core/Theme/CoreThemesAutoloadedForTestsTest.php
  • core/themes/default_admin/tests/src/Unit/ImplementationNameTest.php

Were these omitted intentionally? If so I just want to make sure it's documented. There are a few classes where it looks like the reference to Claro doesn't matter much, but there are others where it seems like the reference needs to be changed.

quietone changed the visibility of the branch main to hidden.

quietone’s picture

Issue summary: View changes

@dcam, thanks. I have been a bit behind on getting the issue summaries on these up to date.

I've updated the issue summary from the results in #16

quietone’s picture

Issue summary: View changes
Status: Needs review » Needs work
quietone’s picture

Issue summary: View changes
quietone’s picture

quietone’s picture

Issue summary: View changes
Status: Needs work » Needs review

Actually ImplementationNameTest.php needs fixes over in #3605702: Remove remaining Gin and Claro implementation names from Default Admin theme, so setting this to needs reveiew

quietone’s picture

Issue summary: View changes
daffie’s picture

Status: Needs review » Reviewed & tested by the community

All code changes look good to me.
All remarks on the PR are answered.
For me it is RTBC.

needs-review-queue-bot’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new91 bytes

The 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.

catch’s picture

Needs a rebase.

quietone’s picture

Status: Needs work » Reviewed & tested by the community

Straightforward rebase

  • catch committed aa94eca6 on main
    task: #3582093 Convert Unit and Kernel tests that use Claro to Admin
    
    By...
catch’s picture

Version: main » 11.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed/pushed to main, thanks!

Moving to 11.x for backport.

smustgrave made their first commit to this issue’s fork.

smustgrave’s picture

Status: Patch (to be ported) » Reviewed & tested by the community

Backport is all green.

mstrelan’s picture

Reviewed the main commit and the backport side by side and they appear identical, RTBC +1.

  • catch committed 4a987462 on 11.x
    task: #3582093 Convert Unit and Kernel tests that use Claro to Admin
    
    By...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.