Problem/Motivation
Note: we moved the migration-related Color tests into their own issue here: #3301713: Update migration Color tests to not use Bartik
There are several non-migration tests that have references to Bartik and Seven:
2 core/modules/color/tests/src/Functional/ColorConfigSchemaTest.php
15 core/modules/color/tests/src/Functional/ColorTest.php
These tests should be updated to either use Olivero, Claro, or System module's test_theme so we can deprecate Bartik #3249109: Deprecate Bartik and Seven #3084814: Deprecate Seven theme as mentioned at #3278124: Convert various tests that use bartik/seven to olivero/claro.
Steps to reproduce
git grep -E '(bartik)|(seven)' -- 'core/modules/color/tests' | awk -F: '{print $1}' | sort | uniq -c
should return no results when this work is complete.
Remaining tasks
Update the tests.
User interface changes
None.
API changes
None.
Data model changes
None.
Release notes snippet
I don't think we need release notes or a change record.
Comment | File | Size | Author |
---|---|---|---|
#40 | 3281430-40-95x.patch | 1.39 KB | bnjmnm |
#40 | interdiff_39-40.txt | 1003 bytes | bnjmnm |
#39 | 3281430-39-95x.patch | 1022 bytes | bnjmnm |
#23 | Screenshot from 2022-08-04 15-12-15.png | 27.81 KB | Vighneshh |
Issue fork drupal-3281430
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3281430-update-color-tests changes, plain diff MR !2583
Comments
Comment #2
deviantintegral CreditAttribution: deviantintegral at Lullabot commentedComment #3
deviantintegral CreditAttribution: deviantintegral at Lullabot commentedComment #4
daffie CreditAttribution: daffie commentedAssign this issue to the parent #3285205: [META] Convert test that use Bartik/Seven to Olivero/Claro.
Comment #5
quietone CreditAttribution: quietone at PreviousNext commentedThe migration tests need to continue to use Bartik and/or Seven because the source site will have those themes. Also, since the Color module is deprecated these tests will move to contrib.
I have struck out these tests in the Issue Summary.
Comment #6
quietone CreditAttribution: quietone at PreviousNext commentedFix formatting
Comment #7
nod_given #3270899: Remove Color module from core do we need to do this at all?
Comment #8
deviantintegral CreditAttribution: deviantintegral at Lullabot commentedWe'll need it for 9.x I think. At that point, if color hasn't been removed from 10.x yet I don't see any harm in changing it there too, given how most of these have applied easily to both branches.
Comment #9
nod_Sounds good
Comment #10
catchWe need to do something with the color migration tests for bartik/seven.
If color, bartik, and seven are all deprecated at the same time, perhaps we could mark those tests legacy but keep them how they are. But we'd need to remove color module from core before bartik/seven in 10.0.x then to avoid things blowing up.
Alternatively, we could try moving the color tests to bartik/seven instead in order to be able to remove the themes before color modules.
I'm don't think it's useful to do an extensive refactoring of the tests to use a test color-enabled theme (unless we somehow already have one?) only to then move everything to contrib where pulling in the dependencies for testing would be fine again.
Comment #11
catchComment #14
nod_Way easier than I expected :)
Comment #15
Spokje1 out of 4 tests does not a summer make ;)
Comment #16
SpokjeAll tests now run on
color_test_theme
, which leaves us with:I have no clue what to do with #5 and especially:
We _can_ move it to Bartik, but that would be a problem when color goes out of core first.
We _can_ split that off into a separate issue and review/commit what we got now, it at least decouples color from bartik a bit more.
Putting this on NR to get more opinions on how to proceed.
Comment #17
catchLet's split the migration test out, I'm not sure what to do with it either. We might to do something like mark it skipped and then re-enable in the contrib versions.
Comment #18
SpokjeComment #19
SpokjeMigration related test now has its own issue: #3301713: Update migration Color tests to not use Bartik
Comment #20
SpokjeComment #21
SpokjeComment #22
SpokjeThe current MR definitely needs a separate
9.5.x
patch, I _think_ the MR will apply to10.1.x
, but let's get somebody to review the MR first before getting into that grind.Comment #23
Vighneshh CreditAttribution: Vighneshh at QED42 for Drupal India Association commentedTested The current MR and found no Non-migration errors
Adding screenshot of the command output
Moving to RTBC.
Comment #24
SpokjeComment #25
SpokjeComment #26
SpokjeComment #27
SpokjeMR !2583 applies to both
10.0.x
and10.1.x
.Comment #28
SpokjeComment #30
Spokje(Rather weird) random test-failure, did a retest, all green => back to RTBC
Comment #31
SpokjeComment #32
lauriiiMoving to needs review because #23 doesn't make it clear whether the code changes have been reviewed.
Comment #33
SpokjeComment #34
nod_Looks good to me, better than before :)
Comment #35
catchCommitted/pushed to 10.1.x, cherry-picked to 10.0.x and 9.5.x, thanks!
Comment #37
catchComment #39
bnjmnmThis potentially fixes the PHP 7.3 conflict introduced in this issue. Assumes HEAD still has the issue and hasn't been reverted.
Comment #40
bnjmnmThe fix in #39 meant 2 unused USE statements.
Comment #41
SpokjeThanks @bnjmnm.
I originally had a 9.5.x patch in #26, but after the back to NR and the short time between RTBC and Fixed and didn't had the time to create a new one.
This is indeed needed for PHP 7.3.
RTBC + 1 if TestBot agrees (which it should).
Comment #43
xjmFail is a known random unrelated to Color.
Committed the hotfix to 9.5.x. Thanks @bnjmnm for the quick followup!