Created
April 25, 2018 12:47
-
-
Save dsantuc/236e8080c7ac1d1476125e3cc4f14b3f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Behat code to wait for ajax calls to complete | |
public function waitForAjax ($seconds=5) { | |
if(!$this->getSession()->wait((1000 * $seconds), "jQuery.active == 0")) { | |
throw new Exception("Ajax calls still pending after $seconds seconds."); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment