Add defaultTheme in tests extending BrowserTestBase.
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
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#11 | 3095630-11.patch | 7.03 KB | phenaproxima |
#10 | 3095630-10.patch | 6 KB | oknate |
Comments
Comment #2
rpayanmComment #3
oknateExcellent. Only thing I noticed:
It's missing for EntityBrowserUpdateHookTest, which extends UpdatePathTestBase which extends BrowserTestBase.
Comment #4
oknateAddressing #4.
Comment #5
oknateComment #6
oknateI can't get the 8.x-1.x branch to test against the upcoming releases 8.8 and 8.9.
I think #4 is ready for the 8.x-2.x branch, and I'm considering committing it there, but I don't think there's a rush, and I'd like to figure out why we have failures on the 8.9 branch.
Comment #7
BerdirAgreed, this is ready for 8.x-2.x.
https://www.drupal.org/pift-ci-job/1491221 is interesting, as it shows that we use FileSystem::copy(), that only exists in 8.7 and we didn't update our min version to that. AFAIK the media_entity team does not plan to make media_entity 9.0.x compatible (but someone else might), so I wouldn't bother with making the 8.x-1.x D9 ready unless someone steps up and helps :)
I've already commented in #3057212: Drupal 9 compatibility on how to update our core version dependency to make it explicit.
Not sure about 8.9, since both tests seem to be a about contrib module integrations, maybe the fault is in them? There aren't many changes in 8.8 vs 8.9 yet..
Comment #8
oknateQueuing tests against 8.8. For some reason, I didn't do that in #4 yet.
Comment #9
oknateTests failed against 8.8: https://www.drupal.org/pift-ci-job/1504122
Comment #10
oknateReroll.
Comment #11
phenaproximaA shot in the dark, but I wonder if changing the default theme to Classy for ParagraphsTest and InlineEntityFormTest would fix this.
Comment #12
BerdirYeah, that's certainly the easiest way to get them to pass for now, can always decouple from classy later.
Comment #14
oknateCommitted to 8.x-2.x, let's see if it works for 8.x-1.x too.
Comment #16
oknateCommitted to 8.x-2.x too.