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.

This is (likely) a relatively small issue. Only three test classes use Classy.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

CommentFileSizeAuthor
#3 3272336-3.patch3.2 KBdanflanagan8

Comments

danflanagan8 created an issue. See original summary.

danflanagan8’s picture

Assigned: Unassigned » danflanagan8
danflanagan8’s picture

Status: Active » Needs review
StatusFileSize
new3.2 KB

Simple patch attached.

It may be of interest to note that there is a Function JS test featuring the following lines.

$elements = $page->waitFor(10, function () use ($page) {
      return $page->findAll('css', '.messages--error');
    });
    $this->assertCount(1, $elements, 'Ajax validation messages are displayed once.');

This looked like a candidate for refactoring with the new JsWebAssert::statusMessageExistsAfterWait, but that method cannot count the number of message, which is a key aspect of this assertion.

The reason this assertion works even though that test uses stark is that this message is put on the page by file.js, not the theme. It's an ajax thing.

danflanagan8’s picture

Assigned: danflanagan8 » Unassigned
larowlan’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 3: 3272336-3.patch, failed testing. View results

larowlan’s picture

Status: Needs work » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 3: 3272336-3.patch, failed testing. View results

danflanagan8’s picture

Status: Needs work » Reviewed & tested by the community

Looks like a random fail in a quickedit test. Resetting status.

alexpott’s picture

Version: 9.4.x-dev » 9.3.x-dev

Committed and pushed 0a03e7b151 to 10.0.x and b74c35f541 to 9.5.x and f2bb791372 to 9.4.x. Thanks!

Gonna try running against 9.3.x to see if we can backport to keep tests aligned.

  • alexpott committed 0a03e7b on 10.0.x
    Issue #3272336 by danflanagan8: File tests should not rely on Classy
    

  • alexpott committed b74c35f on 9.5.x
    Issue #3272336 by danflanagan8: File tests should not rely on Classy
    
    (...

  • alexpott committed f2bb791 on 9.4.x
    Issue #3272336 by danflanagan8: File tests should not rely on Classy
    
    (...
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Backported to 9.3.x

  • alexpott committed 8327c68 on 9.3.x
    Issue #3272336 by danflanagan8: File tests should not rely on Classy
    
    (...

Status: Fixed » Closed (fixed)

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