Skip to content

Commit 91aa651

Browse files
[auto-generated] Update plugin files
Check out the commits that caused these changes: moodlehq/moodleapp@c535b7f...76713e2
1 parent 45e7721 commit 91aa651

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

tests/behat/behat_app.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ class behat_app extends behat_app_helper {
4545
];
4646

4747
protected $featurepath = '';
48-
protected $windowsize = '360x720';
4948

5049
/**
5150
* @BeforeScenario

tests/behat/behat_app_helper.php

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ protected function prepare_browser(array $options = []) {
201201
$restart = true;
202202

203203
// Reset its size.
204-
$this->resize_window($this->windowsize, true);
204+
$this->resize_app_window();
205205

206206
// Visit the Ionic URL.
207207
$this->getSession()->visit($this->get_app_url());
@@ -596,4 +596,18 @@ protected function get_first_restricted_version_tag(): ?string {
596596

597597
return null;
598598
}
599+
600+
/**
601+
* Resize window to have app dimensions.
602+
*/
603+
protected function resize_app_window() {
604+
$width = 500;
605+
$height = 720;
606+
$offset = $this->evaluate_script("{
607+
x: window.outerWidth - document.body.offsetWidth,
608+
y: window.outerHeight - window.innerHeight,
609+
}");
610+
611+
$this->getSession()->getDriver()->resizeWindow($width + $offset['x'], $height + $offset['y']);
612+
}
599613
}

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

0 commit comments

Comments
 (0)