public function TestSubContext::afterStep in Drupal Commons 7.3
After every step in a @javascript scenario, we want to wait for AJAX loading to finish.
@AfterStep
File
- tests/
steps/ commons_test.behat.inc, line 133 - Provide Behat step-definitions for generic Commons tests.
Class
Code
public function afterStep($event) {
if (isset($this->javascript) && $this->javascript && empty($this->iframe)) {
$text = $event
->getStep()
->getText();
if (preg_match('/(follow|press|click|submit|viewing|visit|reload|attach)/i', $text)) {
$this
->iWaitForAjax();
}
}
}