You are here

public function ComplexWidgetTest::waitForXpathRemoved in Inline Entity Form 8

Wait and assert removal of an element via XPath.

On fail, save output and throw.

Parameters

string $xpath: The XPath.

int $timeout: The timeout in milliseconds.

Return value

bool Returns always true (else throws).

1 call to ComplexWidgetTest::waitForXpathRemoved()
ComplexWidgetTest::testNestedCreateAndEditWontClash in tests/src/FunctionalJavascript/ComplexWidgetTest.php
Tests that create and edit of nested data won#t clash.

File

tests/src/FunctionalJavascript/ComplexWidgetTest.php, line 1080

Class

ComplexWidgetTest
IEF complex field widget tests.

Namespace

Drupal\Tests\inline_entity_form\FunctionalJavascript

Code

public function waitForXpathRemoved(string $xpath, int $timeout = 10000) : bool {
  $removed = $this
    ->assertSession()
    ->waitForElementRemoved('xpath', $xpath, $timeout);
  if (!$removed) {
    $this
      ->htmlOutput();
    $this
      ->assertTrue($removed);
  }
  return $removed;
}