MDL-77733 behat: enable Axe accessibility tests by default

This commit is contained in:
Simey Lameze
2023-04-04 09:20:19 +08:00
parent 8400206468
commit 56bfaebb70
4 changed files with 27 additions and 10 deletions
+13 -3
View File
@@ -49,7 +49,8 @@ list($options, $unrecognized) = cli_get_params(
'torun' => 0,
'optimize-runs' => '',
'add-core-features-to-theme' => false,
'axe' => false,
'axe' => '',
'no-axe' => false,
'disable-composer' => false,
'composer-upgrade' => true,
'composer-self-update' => true,
@@ -69,7 +70,7 @@ Behat utilities to initialise behat tests
Usage:
php init.php [--parallel=value [--maxruns=value] [--fromrun=value --torun=value]]
[--axe] [-o | --optimize-runs] [-a | --add-core-features-to-theme]
[--no-axe] [-o | --optimize-runs] [-a | --add-core-features-to-theme]
[--no-composer-self-update] [--no-composer-upgrade]
[--disable-composer]
[--help]
@@ -79,7 +80,7 @@ Options:
-m, --maxruns Max parallel processes to be executed at one time
--fromrun Execute run starting from (Used for parallel runs on different vms)
--torun Execute run till (Used for parallel runs on different vms)
--axe Include axe accessibility tests
--no-axe Disable axe accessibility tests.
-o, --optimize-runs
Split features with specified tags in all parallel runs.
@@ -110,6 +111,14 @@ if (!empty($options['help'])) {
exit(0);
}
if (!empty($options['axe'])) {
echo "Axe accessibility tests are enabled by default, to disable them, use the --no-axe option.\n";
}
if (!empty($options['no-axe'])) {
echo "Axe accessibility tests have been disabled.\n";
}
// Check which util file to call.
$utilfile = 'util_single_run.php';
$commandoptions = "";
@@ -127,6 +136,7 @@ if ($options['parallel'] && $options['parallel'] > 1) {
$cmdoptionsforsinglerun = [
'add-core-features-to-theme',
'axe',
'no-axe',
];
foreach ($cmdoptionsforsinglerun as $option) {