Problem/Motivation

Because of #3083275: [meta] Update tests that rely on Classy to not rely on it anymore and Classy being deprecated in Drupal 9 + removed in Drupal 10,: Tests that aren't specifically testing Classy yet declare $defaultTheme = 'classy'; should be refactored to use Stark as the default theme instead.

Proposed resolution

Update AssertBreadcrumbTrait trait to use Stark as the default theme.

The tests that use AssertBreadcrumbTrait are:

  1. BlockContentTypeTest in block_content.module
  2. HelpTopicTest in help_topics.module
  3. (already uses stark!?!?)

  4. TermTranslationTest in taxonomy.module
  5. NodeTypeTest in node.module
  6. BreadcrumbFrontCacheContextsTest in system.module
  7. BreadcrumbTest in system.module

Rather than worrying about updating those now, let's just update the Trait to work with stark or classy.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#2 3248309-2.patch740 bytesdanflanagan8

Comments

danflanagan8 created an issue. See original summary.

danflanagan8’s picture

Issue summary: View changes
Status: Active » Needs review
StatusFileSize
new740 bytes

Here's a patch that changes one selector in the trait to make it work with stark (and classy, FWIW).

I should not that this trait uses another trait called AssertMenuActiveTrailTrait. That trait has one function, assertMenuActiveTrail(), which will never work with stark because it tests for the menu-item--active-trail class, which stark only puts on the toolbar.

This turns out not to be a big deal though. This function is only called during one test class, which is BreadcrumbTest. (That's the only test that passes a $tree to AssertBreadcrumbTrait::assertBreadcrumb(). That test uses the standard profile and it can continue to use the standard profile. So we can just leave it as is.

danflanagan8’s picture

Assigned: danflanagan8 » Unassigned
joachim’s picture

Status: Needs review » Reviewed & tested by the community

LGTM.

  • catch committed 77bd32e on 10.0.x
    Issue #3248309 by danflanagan8: AssertBreadcrumbTrait should not rely on...

  • catch committed b6e7d69 on 9.4.x
    Issue #3248309 by danflanagan8: AssertBreadcrumbTrait should not rely on...

  • catch committed 9a56987 on 9.3.x
    Issue #3248309 by danflanagan8: AssertBreadcrumbTrait should not rely on...
catch’s picture

Version: 9.4.x-dev » 9.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed/pushed to 10.0.x and cherry-picked to 9.4.x and 9.3.x, thanks!

Agreed it's fine to leave AssertMenuActiveTrailTrait for now.

Status: Fixed » Closed (fixed)

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