3 namespace Drupal\DrupalExtension\Context;
5 use Behat\MinkExtension\Context\RawMinkContext;
8 * Extensions to the Mink Extension.
10 class BatchContext extends RawMinkContext {
13 * Wait for the Batch API to finish.
15 * Wait until the id="updateprogress" element is gone,
16 * or timeout after 3 minutes (180,000 ms).
18 * @Given /^I wait for the batch job to finish$/
20 public function iWaitForTheBatchJobToFinish() {
21 $this->getSession()->wait(180000, 'jQuery("#updateprogress").length === 0');