Problem/Motivation

We should add defaultTheme where it will be required in tests extending BrowserTestBase.

Drupal\Tests\BrowserTestBase::$defaultTheme is required in drupal:9.0.0 when using an install profile that does not set a default theme. See https://www.drupal.org/node/2352949, which includes recommendations on which theme to use.

See https://www.drupal.org/node/3083055
and https://www.drupal.org/project/drupal/issues/3082655

Proposed resolution

Add the defaultTheme property to tests that extend BrowserTestBase, where appropriate or another theme where appropriate, based on https://www.drupal.org/node/3083055

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

Release notes snippet

None.

CommentFileSizeAuthor
#18 3105126-18.patch618 bytesAnonymous (not verified)
#11 3095591-11.patch2.37 KBoknate
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

oknate created an issue. See original summary.

oknate’s picture

Issue summary: View changes
oknate’s picture

Issue summary: View changes
oknate’s picture

Issue summary: View changes
oknate’s picture

Issue summary: View changes
oknate’s picture

Issue summary: View changes
oknate’s picture

Issue summary: View changes
oknate’s picture

Issue summary: View changes
oknate’s picture

Issue summary: View changes
oknate’s picture

oknate’s picture

Here's a patch that fixes this. I made one small change related to the autocomplete, based on how the tests for entity reference autocomplete work, because it was failing locally. It just types a blank space after entering the word.

oknate’s picture

Status: Active » Reviewed & tested by the community
oknate’s picture

Status: Reviewed & tested by the community » Needs review

oops, I don't know how I accidentally changed the status.

  • adriancid committed 412710f on 8.x-2.x authored by oknate
    Issue #3095591 by oknate, adriancid: BrowserTestBase::$defaultTheme is...
adriancid’s picture

Status: Needs review » Fixed

thanks

adriancid’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

FileSize
618 bytes

Hello,
Oknate thanks for the patch. I would just like to let you know you forgot to add the default theme variable to the admin toolbar tools test. Bellow is a patch that adds the variable to the /admin_toolbar_tools/tests/src/Functional/AdminToolbarToolsAlterTest.phpAt the same time I would like to apologize to adriancid for opening a new issue regarding this.

Anonymous’s picture

adriancid’s picture

@DenisCi, no problem, just search before post a new issue the next time, and try to use the Issue Summary Template ;-)

Thanks for the patch