Problem/Motivation
ResponsiveImageFieldUiTest.php is at core/modules/responsive_image/src/FunctionalJavascript/ResponsiveImageFieldUiTest.php.
This test was added in #2809513: Convert AJAX part of \Drupal\responsive_image\Tests\ResponsiveImageFieldUiTest to JavascriptTestBase and the rest to BrowserTestBase.
Shouldn't it be at core/modules/responsive_image/tests/src/FunctionalJavascript/ResponsiveImageFieldUiTest.php?
It also doesn't declare a $defaultTheme. Maybe this has been missed since it's not in the correct directory. Maybe it never even runs! I don't know enough about the test bot to say for sure.
Proposed resolution
Move it! And maybe address the $defaultTheme if it throws a deprecation warning.
I suspect there will indeed be a deprecation warning once this test gets moved to the correct directory due to this issue: #3082655: Specify the $defaultTheme property in all functional tests. There is an associated change record for that as well.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | responsiveimagefield-3248816-12.patch | 1.06 KB | bsuttis |
| #12 | interdiff-3248816-10-12.txt | 656 bytes | bsuttis |
| #10 | interdiff-3248816-7-10.txt | 678 bytes | bsuttis |
| #10 | responsiveimagefield-3248816-10.patch | 1.06 KB | bsuttis |
| #7 | responsiveimagefield-3248816-7.patch | 842 bytes | bsuttis |
Comments
Comment #2
larowlanYeah I suspect it's not running
Comment #3
cilefen commentedIt is possible for a novice contributor to take the next step on this one.
Comment #4
danflanagan8Sounds good. I've added a little more context to the IS along with some related issues.
Comment #5
longwaveCan we write a test to ensure all our tests are in the right place in future?
Comment #6
danflanagan8As long as we don't put that one in the wrong place. ;)
Comment #7
bsuttis commentedHere's a patch moving the test to tests/src and I also added $defaultTheme to the test.
Comment #9
danflanagan8The
namespaceline at the top of the test will need to be updated. You can copy off of the other tests that are in the new directory.Comment #10
bsuttis commentedThanks, noticed the namespace issue. Here's another go at it.
Comment #11
danflanagan8Searching the core codebase,
stableis almost never used as the$defaultTheme. I see only one instance. Can we change this tostarkto be more in line with current practice?Comment #12
bsuttis commentedConfirming 'stark' is now used.
Comment #13
quietone commentedBefore applying the patch. Nice to know there is only one misplaced test.
After
And the test appears in the test output, there is only one so we know it is the one that has been moved.
Drupal\Tests\responsive_image\FunctionalJavascript\Responsiv 1 passesThis looks fine to me.
Comment #16
catchCommitted/pushed to 9.4.x and cherry-picked to 9.3.x, thanks!