You are here

public function FeatureContext::beforeJavascriptStep in Acquia Lift Connector 7.2

Same name and namespace in other branches
  1. 7 behat-tests/features/bootstrap/FeatureContext.php \FeatureContext::beforeJavascriptStep()

For javascript enabled scenarios, always wait for AJAX before clicking.

@BeforeStep

File

behat-tests/features/bootstrap/FeatureContext.php, line 114

Class

FeatureContext
Defines application features from the specific context.

Code

public function beforeJavascriptStep($event) {
  $text = $event
    ->getStep()
    ->getText();
  if (preg_match('/(follow|press|click|submit|hover|select)/i', $text)) {
    $this
      ->spinUntilAjaxIsFinished();
  }
}