function JSWebAssert::assertWaitOnAjaxRequest

Same name in other branches
  1. 9 core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php \Drupal\FunctionalJavascriptTests\JSWebAssert::assertWaitOnAjaxRequest()
  2. 8.9.x core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php \Drupal\FunctionalJavascriptTests\JSWebAssert::assertWaitOnAjaxRequest()
  3. 11.x core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php \Drupal\FunctionalJavascriptTests\JSWebAssert::assertWaitOnAjaxRequest()

Waits for AJAX request to be completed.

Parameters

int $timeout: (Optional) Timeout in milliseconds, defaults to 10000.

string $message: (optional) A message for exception.

Throws

\RuntimeException When the request is not completed. If left blank, a default message will be displayed.

File

core/tests/Drupal/FunctionalJavascriptTests/JSWebAssert.php, line 37

Class

JSWebAssert
Defines a class with methods for asserting presence of elements during tests.

Namespace

Drupal\FunctionalJavascriptTests

Code

public function assertWaitOnAjaxRequest($timeout = 10000, $message = 'Unable to complete AJAX request.') : void {
    $this->assertExpectedAjaxRequest(NULL, $timeout, $message);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.