function AjaxWaitTest::testUnnecessaryWait
Same name in other branches
- 10 core/tests/Drupal/FunctionalJavascriptTests/AjaxWaitTest.php \Drupal\FunctionalJavascriptTests\AjaxWaitTest::testUnnecessaryWait()
Tests that an unnecessary wait triggers an error.
File
-
core/
tests/ Drupal/ FunctionalJavascriptTests/ AjaxWaitTest.php, line 23
Class
- AjaxWaitTest
- Tests that unnecessary or untracked XHRs will cause a test failure.
Namespace
Drupal\FunctionalJavascriptTestsCode
public function testUnnecessaryWait() : void {
$this->drupalGet('user');
$this->expectException(\RuntimeException::class);
$this->expectExceptionMessage('There are no AJAX requests to wait for.');
$this->assertSession()
->assertWaitOnAjaxRequest(500);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.