Skip to content

Commit

Permalink
MDL-66979 behat: Warn about old behat.yml file location
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewnicols committed Jan 23, 2021
1 parent 14a267e commit 05fca85
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions admin/tool/behat/lang/en/tool_behat.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
$string['theninfo'] = 'Then. Checkings to ensure the outcomes are the expected ones';
$string['unknownexceptioninfo'] = 'There was a problem with Selenium or your browser. Please ensure you are using the latest version of Selenium. Error:';
$string['viewsteps'] = 'Filter';
$string['warndirrootconfigfound'] = 'A configuration file was found at {$a}. This file is not automatically updated and may become stale. We recommend removing this file.';
$string['wheninfo'] = 'When. Action that provokes an event';
$string['wrongbehatsetup'] = 'Something is wrong with the behat setup and so step definitions cannot be listed: <b>{$a->errormsg}</b><br/><br/>Please check:<ul>
<li>$CFG->behat_dataroot, $CFG->behat_prefix and $CFG->behat_wwwroot are set in config.php with different values from $CFG->dataroot, $CFG->prefix and $CFG->wwwroot.</li>
Expand Down
6 changes: 5 additions & 1 deletion lib/behat/classes/behat_command.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,11 @@ public static function behat_setup_problem() {
}

// Behat test command.
list($output, $code) = self::run(' --help');
$dirrootconfigpath = $CFG->dirroot . DIRECTORY_SEPARATOR . 'behat.yml';
if (file_exists($dirrootconfigpath)) {
self::output_msg(get_string('warndirrootconfigfound', 'tool_behat', $dirrootconfigpath));
}
list($output, $code) = self::run(" --help");

if ($code != 0) {

Expand Down

0 comments on commit 05fca85

Please sign in to comment.