MOBILE-4061 behat: Separate enter site again

main
Pau Ferrer Ocaña 2022-05-16 13:17:27 +02:00
parent a9dddde79a
commit 5aa0cad105
1 changed files with 17 additions and 10 deletions

View File

@ -59,16 +59,7 @@ class behat_app extends behat_app_helper {
return;
}
if (!$this->is_in_login_page()) {
// Already in the site.
return;
}
global $CFG;
$this->i_set_the_field_in_the_app('Your site', $CFG->behat_wwwroot);
$this->i_press_in_the_app('"Connect to your site"');
$this->wait_for_pending_js();
$this->enter_site();
}
/**
@ -278,6 +269,22 @@ class behat_app extends behat_app_helper {
$this->wait_for_pending_js();
}
/**
* Enter site.
*/
protected function enter_site() {
if (!$this->is_in_login_page()) {
// Already in the site.
return;
}
global $CFG;
$this->i_set_the_field_in_the_app('Your site', $CFG->wwwroot);
$this->i_press_in_the_app('"Connect to your site"');
$this->wait_for_pending_js();
}
/**
* Shortcut to let the user enter a course in the app.
*