Skip to content

Commit ae71062

Browse files
[auto-generated] Update plugin files
Check out the commits that caused these changes: moodlehq/moodleapp@6cc23c0...1b56572
1 parent b2c39e2 commit ae71062

File tree

2 files changed

+13
-5
lines changed

2 files changed

+13
-5
lines changed

tests/behat/behat_app.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -237,13 +237,21 @@ public function i_load_more_items_in_the_app(bool $not = false) {
237237
/**
238238
* Trigger swipe gesture.
239239
*
240-
* @When /^I swipe to the (left|right) in the app$/
240+
* @When /^I swipe to the (left|right) (in (".+") )?in the app$/
241241
* @param string $direction Swipe direction
242+
* @param bool $hasLocator Whether a reference locator is used.
243+
* @param string $locator Reference locator.
242244
*/
243-
public function i_swipe_in_the_app(string $direction) {
244-
$method = 'swipe' . ucwords($direction);
245+
public function i_swipe_in_the_app(string $direction, bool $hasLocator = false, string $locator = '') {
246+
if ($hasLocator) {
247+
$locator = $this->parse_element_locator($locator);
248+
}
249+
250+
$result = $this->zone_js("swipe('$direction'" . ($hasLocator ? ", $locator" : '') . ')');
245251

246-
$this->zone_js("getAngularInstance('ion-content', 'CoreSwipeNavigationDirective').$method()");
252+
if ($result !== 'OK') {
253+
throw new DriverException('Error when swiping - ' . $result);
254+
}
247255

248256
$this->wait_for_pending_js();
249257

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 = 2023012400;
9+
$plugin->version = 2023020800;
1010
$plugin->requires = 2016052300;
1111
$plugin->maturity = MATURITY_STABLE;
1212
$plugin->release = '4.1.0';

0 commit comments

Comments
 (0)