Commit f6eb7575 authored by catch's avatar catch

Issue #2734091 by Sam152: Remove tests specific waitForAjaxToFinish methods,...

Issue #2734091 by Sam152: Remove tests specific waitForAjaxToFinish methods, replace with assertSession()->assertWaitOnAjaxRequest
parent ec4bfd91
......@@ -55,7 +55,7 @@ public function testExposedFiltering() {
// Search for "Page One".
$this->submitForm(['title' => 'Page One'], t('Filter'));
$this->waitForAjaxToFinish();
$this->assertSession()->assertWaitOnAjaxRequest();
// Verify that only the "Page One" Node is present.
$html = $session->getPage()->getHtml();
......@@ -64,7 +64,7 @@ public function testExposedFiltering() {
// Search for "Page Two".
$this->submitForm(['title' => 'Page Two'], t('Filter'));
$this->waitForAjaxToFinish();
$this->assertSession()->assertWaitOnAjaxRequest();
// Verify that only the "Page Two" Node is present.
$html = $session->getPage()->getHtml();
......@@ -72,12 +72,4 @@ public function testExposedFiltering() {
$this->assertNotContains('Page One', $html);
}
/**
* Waits for jQuery to become active and animations to complete.
*/
protected function waitForAjaxToFinish() {
$condition = "(0 === jQuery.active && 0 === jQuery(':animated').length)";
$this->assertJsCondition($condition, 10000);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment