[meta] Update tests that rely on Classy to not rely on it anymore

Created on 24 September 2019, about 5 years ago
Updated 27 November 2023, about 1 year ago

Problem/Motivation

  1. #2352949: Deprecate using Classy as the default theme for the 'testing' profile β†’ set a new direction for how to avoid having our tests be dependent on themes that may disappear. It also introduced a BC layer. For now, Drupal core uses that BC layer, and because of that deprecation errors are triggered.

    They were suppressed thanks to \Drupal\Tests\Listeners\DeprecationListenerTrait::getSkippedDeprecations().

  2. #3082655: Specify the $defaultTheme property in all functional tests β†’ removed those suppressions of deprecation errors and instead updating all relevant tests. It did so WITHOUT changing assertions.
  3. Classy will be deprecated in Drupal 9 and removed in Drupal 10 #3050378: [meta] Replace Classy with a starterkit theme β†’
  4. But there's one more thing we can do to minimize the number of tests using classy: modify assertions to not depend on Classy markup. This is possible for lots of tests that aren't explicitly testing Classy.

Proposed resolution

Execute point 3 above.

How to Review Child Issues

  1. Apply the patch or check out the issue branch.
  2. The most basic thing to check is whether there are any results when you search the module being updated for the string classy. There are rare issues like the one described in #25 that may still mention classy, but these should have a @todo.
  3. Examine any changes to selectors and make sure they look ok. Often this is something like changing a selector to use an id instead of a class.
  4. As described in #28 we should be careful to check for negative assertions that have not been updated. A negative assertion that passes with classy may very well still pass with stark without being changed. With this in mind, for any test that has changed from classy to stark, it is wise to search the test for the string css, xpath, and class=. At least one of these strings appears in virtually every assertion that could be affected by changing from classy to stark. Are there any fragile negative assertions that the patch or MR failed to update?

Remaining tasks

Create module-specific issues for all modules with tests that rely on Classy. For modules with many Classy-relying tests, they can be split into multiple issues in whatever form offers manageable scope.

Pease see this Google Sheet for a progress summary.

We will also need to move \Drupal\FunctionalTests\Theme\ClassyTest into the Classy contrib project.

Issues postponed on having starterkit stable:

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Fixed

Version

10.0 ✨

Component
BaseΒ  β†’

Last updated 2 days ago

Created by

πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024