You are here

public function TestSubContext::iWaitForAjax in Drupal Commons 7.3

Wait for AJAX to finish.

@Given I wait for AJAX

1 call to TestSubContext::iWaitForAjax()
TestSubContext::afterStep in tests/steps/commons_test.behat.inc
After every step in a @javascript scenario, we want to wait for AJAX loading to finish.

File

tests/steps/commons_test.behat.inc, line 311
Provide Behat step-definitions for generic Commons tests.

Class

TestSubContext

Code

public function iWaitForAjax() {
  $this
    ->getSession()
    ->wait(5000, 'typeof jQuery !== "undefined" && jQuery.active === 0');
}