a11y: create report in LOG_DIR or 'a11y/'

If LOG_DIR environment variable is set, create report there.
If it is not set, create the report in 'a11y/'.

Bug: T301184
Change-Id: I74fa6e8ee59d43e5a6e57083999107ac27446a62
This commit is contained in:
Željko Filipin 2022-05-05 18:02:18 +02:00 committed by bwang
parent db60481d2b
commit 09fe15e939
3 changed files with 6 additions and 5 deletions

View file

@ -1,6 +1,6 @@
/.storybook/
/docs/
/log/
/a11y/
/i18n/
/node_modules/
/vendor/

2
.gitignore vendored
View file

@ -20,7 +20,7 @@ sftp-config.json
# Building & testing
/composer.lock
/docs
/log
/a11y
/node_modules
/vendor
/coverage

View file

@ -1,4 +1,5 @@
// @ts-nocheck
const path = require( 'path' );
const testData = {
baseUrl: process.env.MW_SERVER,
@ -8,7 +9,8 @@ const testData = {
};
module.exports = {
reportDir: 'log/',
// LOG_DIR set in CI, used to make report files available in Jenkins
reportDir: process.env.LOG_DIR || path.join( process.cwd(), 'a11y/' ),
namespace: 'Vector',
defaults: {
viewport: {
@ -50,8 +52,7 @@ module.exports = {
'set field #wpName1 to ' + testData.loginUser,
'set field #wpPassword1 to ' + testData.loginPassword,
'click #wpLoginAttempt',
'wait for #pt-userpage-2 to be visible', // Confirm login was successful
'click #mw-sidebar-button'
'wait for #pt-userpage-2 to be visible' // Confirm login was successful
]
},
{