Closed (fixed)
Project:
Drupal core
Version:
9.4.x-dev
Component:
link.module
Priority:
Major
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
7 Apr 2022 at 19:52 UTC
Updated:
29 Apr 2022 at 11:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
danflanagan8I'm having a heck of a time trying to get this one test to pass locally. I'm posting a patch where only my trouble test runs. I've had trouble before with tests that use
assertStringContainsStringwhen there is whitespace involved.Comment #3
danflanagan8Well forget about that anyway. I decided to stop fighting and just make a test theme that copies the necessary template from classy. Without this template there aren't wrapper divs and the markup is a mess for assertions.
This patch also contains a number of refactors to use status message assertions where appropriate. Trying to squeeze a little more value into the patch without making the review much tougher.
Comment #4
cliddell commentedReview
1. All references to classy have been removed:
Before
After
2. Patch looks good:
I like the idea of using a small test theme for the tests in this module. Since it eliminates dependency on any other themes which could be potentially removed in the future.
The rest of the patch just seems to be switching out
pageTextContains()assertions forstatusMessageContains()like in the above example. Which IMO is much better since it targets the element which is supposed to be affected.This is a pretty simple patch which seems to be an all around improvement and resolves the issue it was created for. RTBC!
Comment #5
alexpottCommitted and pushed e562f7ee62 to 10.0.x and 73428d6439 to 9.4.x. Thanks!