Problem/Motivation

Split from #3131807: [meta] Replace assertions involving calls to isset() with more appropriate assertions

Proposed resolution

-    $relations_widget = $this->xpath("//details[@id='edit-relations']");
-    $this->assertTrue(isset($relations_widget[0]), 'Relations widget element found.');
+    $this->assertSession()->elementExists('xpath', "//details[@id='edit-relations']");

Remaining tasks

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

None

Issue fork drupal-3253715

Command icon 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:

Comments

mondrake created an issue. See original summary.

mondrake’s picture

Issue summary: View changes
Status: Active » Needs review
mondrake’s picture

rebased

longwave’s picture

Status: Needs review » Needs work

One nitpick about comment wording, when that is fixed this is good to go.

mondrake’s picture

Status: Needs work » Needs review

Thank you!

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Perfect!

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Nice clean up!

Committed and pushed 7ca36cfc98d to 10.0.x and a7a51e54dad to 9.4.x. Thanks!

  • alexpott committed 7ca36cf on 10.0.x
    Issue #3253715 by mondrake, longwave: Replace assertions involving calls...

  • alexpott committed a7a51e5 on 9.4.x
    Issue #3253715 by mondrake, longwave: Replace assertions involving calls...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.