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

Change all tests in this module to use Stark as the default theme, and refactor the tests where needed so they continue to function properly.

Usually we do one module at a time, but these modules are closely related and have relatively little dependence on classy.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#2 3269502-2.patch5.65 KBdanflanagan8

Comments

danflanagan8 created an issue. See original summary.

danflanagan8’s picture

Assigned: danflanagan8 » Unassigned
Status: Active » Needs review
StatusFileSize
new5.65 KB

This one was pretty brainless. Nice and easy.

This one used class in a couple Kernel tests, which is a little unusual. But the required changes are pretty obvious.

danflanagan8’s picture

Priority: Normal » Major
Issue tags: +Drupal 10

Updating priority to Major just like @xjm did for #3248295: Taxonomy tests should not rely on Classy and adding D10 tag.

dww’s picture

Status: Needs review » Reviewed & tested by the community

Patch looks great. I don't think the reduction in specificity harms any of these assertions.

Before

% egrep -ir classy core/modules/field/tests
core/modules/field/tests/src/Functional/Boolean/BooleanFieldTest.php:  protected $defaultTheme = 'classy';
core/modules/field/tests/src/Kernel/DisplayApiTest.php:    \Drupal::service('theme_installer')->install(['classy']);
core/modules/field/tests/src/Kernel/DisplayApiTest.php:    $this->config('system.theme')->set('default', 'classy')->save();
core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php:    // Use Classy theme for testing markup output.
core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php:    \Drupal::service('theme_installer')->install(['classy']);
core/modules/field/tests/src/Kernel/EntityReference/EntityReferenceFormatterTest.php:    $this->config('system.theme')->set('default', 'classy')->save();
% egrep -ir classy core/modules/field_ui/tests
core/modules/field_ui/tests/src/FunctionalJavascript/EntityDisplayTest.php:  protected $defaultTheme = 'classy';

After

% egrep -ir classy core/modules/field/tests
% egrep -ir classy core/modules/field_ui/tests
%

Whereas:

  1. No "classy" in any field(_ui)? tests remaining.
  2. Testbot is happy.
  3. Nothing to complain about in the patch.

Therefore be it resolved: RTBC. 😉

Thanks @danflanagan8!

  • catch committed ee5db83 on 10.0.x
    Issue #3269502 by danflanagan8, dww: Field and Field UI tests should not...

  • catch committed 39865b5 on 9.4.x
    Issue #3269502 by danflanagan8, dww: Field and Field UI tests should not...
catch’s picture

Status: Reviewed & tested by the community » Fixed

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

Status: Fixed » Closed (fixed)

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