Commit bd2772d9 authored by alexpott's avatar alexpott

Issue #2783819 by Lendude: Update AjaxThemeTest to use assertWaitOnAjaxRequest

parent 08b7a3fb
......@@ -36,18 +36,10 @@ public function testAjaxWithAdminRoute() {
$this->drupalGet('ajax-test/dialog');
$assert->pageTextNotContains('Current theme: stable');
$this->clickLink('Link 8 (ajax)');
$this->waitForAjaxToFinish();
$assert->assertWaitOnAjaxRequest();
$assert->pageTextContains('Current theme: stable');
$assert->pageTextNotContains('Current theme: seven');
}
/**
* 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