Problem/Motivation
In #3167880: [meta] Convert assertions involving use of xpath to WebAssert, where possible we identified that use of $this->xpath() can be dangerous as we aren't always testing what we expect to test. In WebAssert we have more appropriate methods to find and assert HTML elements, so we should use them where possible.
This issue is scoped to find XPath selectors for <label> elements and convert those where possible.
Steps to reproduce
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3220183
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:
- 3220183-convert-assertions-involving
changes, plain diff MR !833
Comments
Comment #2
mondrakeComment #3
mondrakeComment #5
mondrakeI messed a bit with MR target branches, but should be OK for review now.
Comment #6
longwaveThese are all so much easier to read. I could only find one remaining case of a label in
xpath()in UserAccountLinksTest and I think this has to stay as is:Therefore there is nothing else left to do here and this is RTBC.
Comment #8
catchCommitted/pushed to 9.3.x and cherry-picked to 9.2.x, thanks!