protected function JavascriptTestTrait::waitForAjaxToFinish in Commerce Core 8.2
Waits for jQuery to become active and animations to complete.
File
- tests/
src/ Traits/ JavascriptTestTrait.php, line 56
Class
- JavascriptTestTrait
- Allows tests using BrowserTest run with Javascript enabled.
Namespace
Drupal\Tests\commerce\TraitsCode
protected function waitForAjaxToFinish() {
$condition = "(0 === jQuery.active && 0 === jQuery(':animated').length)";
$this
->assertJsCondition($condition, 10000);
}