Skip to content

Commit 0f55021

Browse files
[auto-generated] Update plugin files
Check out the commits that caused these changes: moodlehq/moodleapp@609c33d...bdd6aeb
1 parent 93ad203 commit 0f55021

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

tests/behat/behat_app.php

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -958,4 +958,46 @@ public function i_open_a_browser_tab_with_url(string $url) {
958958
$this->getSession()->switchToWindow($windowNames[1]);
959959
}
960960

961+
962+
/**
963+
* Check if a notification has been triggered and is present.
964+
*
965+
* @Then /^a notification with title (".+") is( not)? present in the app$/
966+
* @param string $title Notification title
967+
* @param bool $not Whether assert that the notification was not found
968+
*/
969+
public function notification_present_in_the_app(string $title, bool $not = false) {
970+
$result = $this->runtime_js("notificationIsPresentWithText($title)");
971+
972+
if ($not && $result === 'YES') {
973+
throw new ExpectationException("Notification is present", $this->getSession()->getDriver());
974+
}
975+
976+
if (!$not && $result === 'NO') {
977+
throw new ExpectationException("Notification is not present", $this->getSession()->getDriver());
978+
}
979+
980+
if ($result !== 'YES' && $result !== 'NO') {
981+
throw new DriverException('Error checking notification - ' . $result);
982+
}
983+
984+
return true;
985+
}
986+
987+
/**
988+
* Close a notification present in the app
989+
*
990+
* @Then /^I close a notification with title (".+") in the app$/
991+
* @param string $title Notification title
992+
*/
993+
public function close_notification_app(string $title) {
994+
$result = $this->runtime_js("closeNotification($title)");
995+
996+
if ($result !== 'OK') {
997+
throw new DriverException('Error closing notification - ' . $result);
998+
}
999+
1000+
return true;
1001+
}
1002+
9611003
}

version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
defined('MOODLE_INTERNAL') || die;
88

9-
$plugin->version = 2022102000;
9+
$plugin->version = 2022111100;
1010
$plugin->requires = 2016052300;
1111
$plugin->maturity = MATURITY_STABLE;
1212
$plugin->release = '4.1.0-dev';

0 commit comments

Comments
 (0)