mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 12:32:08 +02:00
MDL-56614 behat: add missing wait for page is ready
This commit is contained in:
parent
383b2f9eb6
commit
ef0d68e9b5
@ -134,13 +134,10 @@ class behat_theme_boost_behat_navigation extends behat_navigation {
|
||||
* If we are not on the course main page, click on the course link in the navbar
|
||||
*/
|
||||
protected function go_to_main_course_page() {
|
||||
$starturl = rtrim($this->getMinkParameter('base_url'), '/') . '/';
|
||||
$url = $this->getSession()->getCurrentUrl();
|
||||
if (strpos($url, $starturl) === 0) {
|
||||
$url = substr($url, strlen($starturl));
|
||||
}
|
||||
if (!preg_match('|^course/view.php?id=[\d]+|', $url)) {
|
||||
if (!preg_match('|/course/view.php\?id=[\d]+$|', $url)) {
|
||||
$this->find('xpath', '//header//div[@id=\'page-navbar\']//a[contains(@href,\'/course/view.php?id=\')]')->click();
|
||||
$this->execute('behat_general::wait_until_the_page_is_ready');
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user