Skip to content

Commit b2c39e2

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

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

tests/behat/behat_app.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
require_once(__DIR__ . '/../../../../lib/behat/behat_base.php');
2020
require_once(__DIR__ . '/behat_app_helper.php');
2121

22+
use Behat\Behat\Hook\Scope\ScenarioScope;
2223
use Behat\Gherkin\Node\TableNode;
2324
use Behat\Mink\Exception\DriverException;
2425
use Behat\Mink\Exception\ExpectationException;
@@ -45,6 +46,27 @@ class behat_app extends behat_app_helper {
4546

4647
protected $windowsize = '360x720';
4748

49+
/**
50+
* @BeforeScenario
51+
*/
52+
public function before_scenario(ScenarioScope $scope) {
53+
if (!$scope->getFeature()->hasTag('app')) {
54+
return;
55+
}
56+
57+
global $CFG;
58+
59+
$performanceLogs = $CFG->behat_profiles['default']['capabilities']['extra_capabilities']['goog:loggingPrefs']['performance'] ?? null;
60+
61+
if ($performanceLogs !== 'ALL') {
62+
return;
63+
}
64+
65+
// Enable DB Logging only for app tests with performance logs activated.
66+
$this->getSession()->visit($this->get_app_url() . '/assets/env.json');
67+
$this->execute_script("document.cookie = 'MoodleAppDBLoggingEnabled=true;path=/';");
68+
}
69+
4870
/**
4971
* Opens the Moodle App in the browser and optionally logs in.
5072
*

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

0 commit comments

Comments
 (0)