diff --git a/admin/tool/behat/index.php b/admin/tool/behat/index.php index da7f7aa8e4908..4fc15fcb8892b 100644 --- a/admin/tool/behat/index.php +++ b/admin/tool/behat/index.php @@ -24,12 +24,16 @@ require(__DIR__ . '/../../../config.php'); require_once($CFG->libdir.'/adminlib.php'); +require_once($CFG->dirroot . '/' . $CFG->admin . '/tool/behat/locallib.php'); + +$action = optional_param('action', 'info', PARAM_ALPHAEXT); admin_externalpage_setup('toolbehat'); +$title = get_string('pluginname', 'tool_behat') . ' - ' . get_string('command' . $action, 'tool_behat'); echo $OUTPUT->header(); -echo $OUTPUT->heading(get_string('pluginname', 'tool_behat')); -echo $OUTPUT->box_start(); -echo get_string('installationinfo', 'tool_behat'); -echo $OUTPUT->box_end(); +echo $OUTPUT->heading($title); + +call_user_func('tool_behat::' . $action); + echo $OUTPUT->footer(); diff --git a/admin/tool/behat/lang/en/tool_behat.php b/admin/tool/behat/lang/en/tool_behat.php index 4627cc2f1b6a2..1525cd4fd09f2 100644 --- a/admin/tool/behat/lang/en/tool_behat.php +++ b/admin/tool/behat/lang/en/tool_behat.php @@ -22,5 +22,13 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -$string['pluginname'] = 'Behat'; -$string['installationinfo'] = ''; \ No newline at end of file +$string['actionnotsupported'] = 'Action not supported'; +$string['commandbuildconfigfile'] = 'Build config file'; +$string['commandinfo'] = 'Info'; +$string['commandruntests'] = 'Run tests'; +$string['commandstepsdefinitions'] = 'Steps definitions list'; +$string['finished'] = 'Process finished'; +$string['nobehatpath'] = 'You must specify the path to moodle-acceptance-tests.'; +$string['nostepsdefinitions'] = 'There aren\'t steps definitions matching this filter'; +$string['pluginname'] = 'Acceptance test tool'; +$string['wrongbehatsetup'] = 'Something is wrong with the setup, check moodle-acceptance-tests runs well on CLI and check your \'behatpath\' setting value is pointing to the right directory'; \ No newline at end of file