Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Comment | File | Size | Author |
---|---|---|---|
#30 | interdiff-2863416-27-30.txt | 1.22 KB | naveenvalecha |
#30 | 2863416-30.patch | 14.38 KB | naveenvalecha |
Comments
Comment #2
jofitz CreditAttribution: jofitz at ComputerMinds commentedSorry @nlisgo, I only just noticed you had assigned this to yourself after doing the work.
Comment #4
nlisgo CreditAttribution: nlisgo commented@jo-fitzgerald Happy to step away from this and move on to a different module.
Comment #5
zviryatko CreditAttribution: zviryatko as a volunteer and at Adyax commentedAbout changes in
core/modules/filter/tests/src/Functional/FilterAdminTest.php
assertFieldByName()
now deprecated and was changed, so third paramater was removed, also test assert was changed because we need to check that checkboxes, which was checked on add filter form, is checked on filter edit form.Also
$this->xpath()
now returnNodeElement[]
array, instead of\SimpleXMLElement[]|bool
, so all function call also changed.Comment #6
zviryatko CreditAttribution: zviryatko as a volunteer and at Adyax commentedComment #7
dawehnerHi @zviryatko, thank you for your contribution!
First tip: Try to use the following git configuration:
[diff]
renames = copies
This detects renames, see https://www.drupal.org/documentation/git/configure for more details. This will make the patch size significantly smaller.
Comment #8
zviryatko CreditAttribution: zviryatko as a volunteer and at Adyax commentedSorry, forgot about this ((
Comment #9
zviryatko CreditAttribution: zviryatko as a volunteer and at Adyax commentedComment #10
michielnugter CreditAttribution: michielnugter as a volunteer and at Synetic commented@zviryatko Thanks for the patch! Great to see this moving forward!
Some review comments:
You can use assertNotEmpty here.
You can use assertEmpty() here.
(string) cast is not required anymore
(string) cast is not required anymore
Comment #11
michielnugter CreditAttribution: michielnugter as a volunteer and at Synetic commentedComment #12
zviryatko CreditAttribution: zviryatko as a volunteer and at Adyax commentedComment #13
zviryatko CreditAttribution: zviryatko as a volunteer and at Adyax commentedComment #14
dawehnerI really like these changes.
+1 also for this change. IMHO we don't loose any level of test coverage here.
Comment #15
alexpottCommitted and pushed 26ad8f8 to 8.4.x and 589eede to 8.3.x. Thanks!
Committed to 8.3.x since this is tests only.
Comment #20
alexpottThis clashed with #2868019: AssertLegacyTrait field assertions not compatible with Simpletest assertions and resulted in HEAD fails.
Comment #21
michielnugter CreditAttribution: michielnugter as a volunteer and at Synetic commentedSorry about that @alexpott, didn't catch that one at review.
Updated the patch to conform to the new AssertLegacyTrait, this should pass.
Comment #22
andypostLet's get it in
Comment #24
alexpottCommitted and pushed facaf22 to 8.4.x and d002aa9 to 8.3.x. Thanks!
Comment #27
alexpottI'm really sorry - additional problems with #2868019: AssertLegacyTrait field assertions not compatible with Simpletest assertions came to light so we had to revert it - which means we have to revert this too.
Re-uploading #12 as that worked before and will commit if it is green.
Comment #28
alexpottComment #29
michielnugter CreditAttribution: michielnugter as a volunteer and at Synetic commentedDiscussed with @alexpott on IRC. We'll have to fix the checkbox assertion that currently is failing to a correct test using the non-deprecated methods of Mink.
This assertion is incorrect because it checks if the value is equal to a role ID. Reading the test what was attempted to assert was if the checkbox was checked or not, this assertion does not test this at all. At most it tests if the checkbox is rendered properly with a value matching the name.
Without using the deprecated methods you could assert the state of a checkbox like this:
or
Comment #30
naveenvalechaAs we have checkbox names available. So we could use
$this->assertSession()->checkboxChecked
//Naveen
Comment #31
michielnugter CreditAttribution: michielnugter as a volunteer and at Synetic commented@naveenvalecha thanks for the patch!
Looks good, setting to RTBC.
Comment #33
Mile23Maybe related: #2363815: FilterHtmlImageSecureTest fails on MAMP, not on testbot.
Comment #34
naveenvalechaback to RTBC per #31
Comment #37
catchCommitted/pushed to 8.5.x and cherry-picked to 8.4.x. Thanks!
Comment #39
catch