You are here

protected function StockBrowserTestBase::waitForAjaxToFinish in Commerce Stock 8

Waits for jQuery to become active and animations to complete.

File

tests/src/Functional/StockBrowserTestBase.php, line 152

Class

StockBrowserTestBase
Defines base class for commerce stock test cases.

Namespace

Drupal\Tests\commerce_stock\Functional

Code

protected function waitForAjaxToFinish() {
  $condition = "(0 === jQuery.active && 0 === jQuery(':animated').length)";
  $this
    ->assertJsCondition($condition, 10000);
}