Skip to content
Snippets Groups Projects
Commit cbf8e9d1 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2783819 by Lendude: Update AjaxThemeTest to use assertWaitOnAjaxRequest

(cherry picked from commit bd2772d9)
parent fc61db3b
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment