mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
MDL-63977 Behat: Rename Ionic config variables for consistency
This commit is contained in:
parent
079eae376c
commit
ff3ccab52e
@ -24,7 +24,7 @@
|
||||
|
||||
$string['aim'] = 'This administration tool helps developers and test writers to create .feature files describing Moodle\'s functionalities and run them automatically. Step definitions available for use in .feature files are listed below.';
|
||||
$string['allavailablesteps'] = 'All available step definitions';
|
||||
$string['errorapproot'] = '$CFG->behat_approot is not pointing to a valid Moodle Mobile developer install.';
|
||||
$string['errorapproot'] = '$CFG->behat_ionic_dirroot is not pointing to a valid Moodle Mobile developer install.';
|
||||
$string['errorbehatcommand'] = 'Error running behat CLI command. Try running "{$a} --help" manually from CLI to find out more about the problem.';
|
||||
$string['errorcomposer'] = 'Composer dependencies are not installed.';
|
||||
$string['errordataroot'] = '$CFG->behat_dataroot is not set or is invalid.';
|
||||
|
@ -869,11 +869,11 @@ $CFG->admin = 'admin';
|
||||
// define('BEHAT_DISABLE_HISTOGRAM', true);
|
||||
//
|
||||
// Mobile app Behat testing requires this option, pointing to a developer Moodle Mobile directory:
|
||||
// $CFG->behat_approot = '/where/I/keep/my/git/checkouts/moodlemobile2';
|
||||
// $CFG->behat_ionic_dirroot = '/where/I/keep/my/git/checkouts/moodlemobile2';
|
||||
//
|
||||
// The following option can be used to indicate a running Ionic server (otherwise Behat will start
|
||||
// one automatically for each test run, which is convenient but takes ages):
|
||||
// $CFG->behat_ionicaddress = 'http://localhost:8100';
|
||||
// $CFG->behat_ionic_wwwroot = 'http://localhost:8100';
|
||||
//
|
||||
//=========================================================================
|
||||
// 12. DEVELOPER DATA GENERATOR
|
||||
|
@ -220,7 +220,7 @@ class behat_command {
|
||||
}
|
||||
|
||||
// If app config is supplied, check the value is correct.
|
||||
if (!empty($CFG->behat_approot) && !file_exists($CFG->behat_approot . '/ionic.config.json')) {
|
||||
if (!empty($CFG->behat_ionic_dirroot) && !file_exists($CFG->behat_ionic_dirroot . '/ionic.config.json')) {
|
||||
self::output_msg(get_string('errorapproot', 'tool_behat'));
|
||||
return BEHAT_EXITCODE_CONFIG;
|
||||
}
|
||||
|
@ -705,12 +705,12 @@ class behat_config_util {
|
||||
protected function get_mobile_version_tags() : string {
|
||||
global $CFG;
|
||||
|
||||
if (empty($CFG->behat_approot)) {
|
||||
if (empty($CFG->behat_ionic_dirroot)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
// Get app version.
|
||||
$jsonpath = $CFG->behat_approot . '/package.json';
|
||||
$jsonpath = $CFG->behat_ionic_dirroot . '/package.json';
|
||||
$json = @file_get_contents($jsonpath);
|
||||
if (!$json) {
|
||||
throw new coding_exception('Unable to load app version from ' . $jsonpath);
|
||||
@ -1360,7 +1360,7 @@ class behat_config_util {
|
||||
|
||||
// Mobile app tests are not theme-specific, so run only for the default theme (and if
|
||||
// configured).
|
||||
if (empty($CFG->behat_approot) || $theme !== $this->get_default_theme()) {
|
||||
if (empty($CFG->behat_ionic_dirroot) || $theme !== $this->get_default_theme()) {
|
||||
$themeblacklisttags[] = '@app';
|
||||
}
|
||||
|
||||
|
@ -103,8 +103,8 @@ class behat_app extends behat_base {
|
||||
}
|
||||
|
||||
// Check the config settings are defined.
|
||||
if (empty($CFG->behat_ionicaddress) && empty($CFG->behat_approot)) {
|
||||
throw new DriverException('$CFG->behat_ionicaddress or $CFG->behat_approot must be defined.');
|
||||
if (empty($CFG->behat_ionic_wwwroot) && empty($CFG->behat_ionic_dirroot)) {
|
||||
throw new DriverException('$CFG->behat_ionic_wwwroot or $CFG->behat_ionic_dirroot must be defined.');
|
||||
}
|
||||
}
|
||||
|
||||
@ -176,15 +176,15 @@ class behat_app extends behat_base {
|
||||
protected function start_or_reuse_ionic() {
|
||||
global $CFG;
|
||||
|
||||
if (!empty($CFG->behat_ionicaddress)) {
|
||||
if (!empty($CFG->behat_ionic_wwwroot)) {
|
||||
// Use supplied Ionic server which should already be running.
|
||||
$url = $CFG->behat_ionicaddress;
|
||||
$url = $CFG->behat_ionic_wwwroot;
|
||||
} else if (self::$ionicrunning) {
|
||||
// Use existing Ionic instance launched previously.
|
||||
$url = self::$ionicrunning->url;
|
||||
} else {
|
||||
// Open Ionic process in relevant path.
|
||||
$path = realpath($CFG->behat_approot);
|
||||
$path = realpath($CFG->behat_ionic_dirroot);
|
||||
$stderrfile = $CFG->dataroot . '/behat/ionic-stderr.log';
|
||||
$prefix = '';
|
||||
// Except on Windows, use 'exec' so that we get the pid of the actual Node process
|
||||
|
Loading…
x
Reference in New Issue
Block a user