From 09fe15e9393ff9a4831e2a433a91b2dda86a6688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDeljko=20Filipin?= Date: Thu, 5 May 2022 18:02:18 +0200 Subject: [PATCH] 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 --- .eslintignore | 2 +- .gitignore | 2 +- tests/a11y/a11y.config.js | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.eslintignore b/.eslintignore index 0c41319b..ae7d35d0 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,6 +1,6 @@ /.storybook/ /docs/ -/log/ +/a11y/ /i18n/ /node_modules/ /vendor/ diff --git a/.gitignore b/.gitignore index e4f87eeb..ec5c493f 100644 --- a/.gitignore +++ b/.gitignore @@ -20,7 +20,7 @@ sftp-config.json # Building & testing /composer.lock /docs -/log +/a11y /node_modules /vendor /coverage diff --git a/tests/a11y/a11y.config.js b/tests/a11y/a11y.config.js index e6a47103..266bb810 100644 --- a/tests/a11y/a11y.config.js +++ b/tests/a11y/a11y.config.js @@ -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 ] }, {