Provides feedback when trying to use the web interface
to list steps definitions when $CFG->behat_dataroot hasn't
been set or can not be written
$string['newtestsinfo'] = 'Read {$a} for info about how to write new tests';
$string['nostepsdefinitions'] = 'There aren\'t steps definitions matching this filters';
$string['pluginname'] = 'Acceptance testing';
+$string['runclitool'] = 'To list the steps definitions you need to run the Behat CLI tool to create the $CFG->behat_dataroot directory. Go to your moodle dirroot and run "{$a}"';
$string['stepsdefinitionscomponent'] = 'Area';
$string['stepsdefinitionscontains'] = 'Contains';
$string['stepsdefinitionsfilters'] = 'Steps definitions';
if ($code != 0) {
notice(get_string('wrongbehatsetup', 'tool_behat'));
}
+
+ // Checking behat dataroot existence otherwise notice about admin/tool/behat/cli/util.php.
+ if (empty($CFG->behat_dataroot) || !is_dir($CFG->behat_dataroot) || !is_writable($CFG->behat_dataroot)) {
+ notice(get_string('runclitool', 'tool_behat', 'php admin/tool/behat/cli/util.php'));
+ }
}
/**