From 680e9f0db012c7eca3680ec49d2d73dcef591e88 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 10:21:17 +0000 Subject: [PATCH] [auto-generated] Update plugin files Check out the commits that caused these changes: https://github.com/moodlehq/moodleapp/compare/e49f10e988d0d3c7f62aa740d5ee4ceb614893ef...3278d5a77f19ecf68c94ee9049d9ba4dea8ed9e2 --- tests/behat/behat_app.php | 47 ++++++++++++++++++++++++++++++++++++++- version.php | 2 +- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/tests/behat/behat_app.php b/tests/behat/behat_app.php index ca9a155..012aff3 100644 --- a/tests/behat/behat_app.php +++ b/tests/behat/behat_app.php @@ -467,7 +467,7 @@ public function i_enter_the_activity_in_the_app(string $activity, string $activi /** * Presses standard buttons in the app. * - * @When /^I press the (back|more menu|page menu|user menu|main menu) button in the app$/ + * @When /^I press the (back|more menu|page menu|user menu) button in the app$/ * @param string $button Button type * @throws DriverException If the button push doesn't work */ @@ -485,6 +485,51 @@ public function i_press_the_standard_button_in_the_app(string $button) { $this->wait_for_pending_js(); } + /** + * Presses go back repeatedly in the app. + * + * @When /^I go back( (\d+) times)? in the app$/ + * @param int $times + * @throws DriverException If the navigation doesn't work + */ + public function i_go_back_x_times_in_the_app(?string $unused = null, ?int $times = 1) { + if ($times < 1) { + return; + } + + $this->spin(function() use ($times) { + $result = $this->runtime_js("goBackTimes($times)"); + + if ($result !== 'OK') { + throw new DriverException('Error navigating back - ' . $result); + } + + return true; + }); + + $this->wait_for_pending_js(); + } + + /** + * Presses go back repeatedly until the app is in the main menu. + * + * @When /^I go back to the root page in the app$/ + * @throws DriverException If the navigation doesn't work + */ + public function i_go_back_to_root_in_the_app() { + $this->spin(function() { + $result = $this->runtime_js("goBackToRoot()"); + + if ($result !== 'OK') { + throw new DriverException('Error navigating to root - ' . $result); + } + + return true; + }); + + $this->wait_for_pending_js(); + } + /** * Receives push notifications. * diff --git a/version.php b/version.php index 8688cb4..cd5018f 100644 --- a/version.php +++ b/version.php @@ -6,7 +6,7 @@ defined('MOODLE_INTERNAL') || die; -$plugin->version = 2024090200; +$plugin->version = 2024090500; $plugin->requires = 2016052300; $plugin->maturity = MATURITY_STABLE; $plugin->release = '4.5.0';