Remove wmf-a11y dependency and tests

Change-Id: Ib3a61615af634ad7dc94fa09d521b90bc5db3e0d
This commit is contained in:
bwang 2023-08-17 12:16:42 -05:00
parent 4e4a2791af
commit 54b620042a
5 changed files with 2 additions and 1018 deletions

1
.gitignore vendored
View file

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

933
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -5,8 +5,6 @@
"test": "npm -s run lint && tsc && npm run test:unit", "test": "npm -s run lint && tsc && npm run test:unit",
"test:unit": "jest --silent", "test:unit": "jest --silent",
"test:unit:updateSnapshot": "jest --updateSnapshot", "test:unit:updateSnapshot": "jest --updateSnapshot",
"test:a11y": "wmf-a11y --config 'tests/a11y/a11y.config.js'",
"selenium-daily": "wmf-a11y --config 'tests/a11y/a11y.config.js' --logResults",
"lint": "npm -s run lint:js && npm -s run lint:styles && npm -s run lint:i18n", "lint": "npm -s run lint:js && npm -s run lint:styles && npm -s run lint:i18n",
"lint:fix:js": "npm -s run lint:js -- --fix", "lint:fix:js": "npm -s run lint:js -- --fix",
"lint:fix:styles": "npm -s run lint:styles -- --fix", "lint:fix:styles": "npm -s run lint:styles -- --fix",
@ -46,7 +44,6 @@
"svgo": "3.0.2", "svgo": "3.0.2",
"ts-jest": "27.1.3", "ts-jest": "27.1.3",
"typescript": "4.5.5", "typescript": "4.5.5",
"vue": "3.2.37", "vue": "3.2.37"
"wmf-a11y": "0.0.0"
} }
} }

View file

@ -1,11 +0,0 @@
{
"extends": [
"../../.eslintrc.json"
],
"parserOptions": {
"ecmaVersion": 2018
},
"env": {
"node": true
}
}

View file

@ -1,70 +0,0 @@
// @ts-nocheck
const path = require( 'path' );
const testData = {
baseUrl: process.env.MW_SERVER,
pageUrl: '/wiki/Polar_bear?useskin=vector-2022&tableofcontents=1',
loginUser: process.env.MEDIAWIKI_USER,
loginPassword: process.env.MEDIAWIKI_PASSWORD
};
module.exports = {
// 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: {
width: 1200,
height: 1080
},
runners: [
'axe',
'htmlcs'
],
includeWarnings: true,
includeNotices: true,
ignore: [
'color-contrast',
'WCAG2AA.Principle2.Guideline2_4.2_4_1.G1,G123,G124.NoSuchID'
],
hideElements: '#bodyContent, #siteNotice, #mwe-pt-toolbar, #centralnotice, #centralnotice_testbanner',
chromeLaunchConfig: {
headless: false,
args: [
'--no-sandbox',
'--disable-setuid-sandbox'
]
}
},
tests: [
{
name: 'default',
url: testData.baseUrl + testData.pageUrl,
actions: []
},
{
name: 'logged_in',
url: testData.baseUrl + testData.pageUrl,
wait: '500',
actions: [
'click #pt-login-2 a',
'wait for #wpName1 to be visible',
'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
]
},
{
name: 'search',
url: testData.baseUrl + testData.pageUrl,
rootElement: '#p-search',
wait: '500',
actions: [
'click #searchInput',
'wait for .cdx-text-input__input to be added',
'set field .cdx-text-input__input to Test'
]
}
]
};