Skip to content

Commit

Permalink
Merge branch 'release/1.2.7'
Browse files Browse the repository at this point in the history
  • Loading branch information
vincent-gao committed Oct 17, 2023
2 parents d594f57 + d15acbc commit a0db614
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/behat/bootstrap/TideCommonTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,17 @@ public function findMenuItemMatchingText(string $text): void {
}
}

/**
* Wait for the Batch API to finish.
*
* Wait until the id="updateprogress" element is gone,
* or timeout after the given duration.
*
* @Given /^I wait for the batch process to finish for (\d+) seconds$/
*/
public function iWaitForTheBatchProcessToFinish(int $seconds): void {
$durationInMilliseconds = $seconds * 1000;
$this->getSession()->wait($durationInMilliseconds, 'jQuery("#updateprogress").length === 0');
}

}

0 comments on commit a0db614

Please sign in to comment.