Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(extension): Add jest testing to the extension #1715

Merged
merged 8 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ jobs:
working-directory: cypress-accessibility-checker/test

###############################################################################
# Extension Build verification
# Extension Build verification and test
####
extension-test:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -498,6 +498,9 @@ jobs:
with:
name: accessibility-checker-extension for Firefox
path: accessibility-checker-extension/package/accessibility-checker-extension.zip
- name: Jest tests
run: npm test
working-directory: accessibility-checker-extension

rule-deploy:
runs-on: ubuntu-22.04
Expand Down
2 changes: 2 additions & 0 deletions accessibility-checker-extension/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -673,3 +673,5 @@ ASALocalRun/
.localhistory/

# End of https://www.gitignore.io/api/node,macos,linux,eclipse,windows,intellij,visualstudio,microsoftoffice,visualstudiocode

.achecker/results
48 changes: 48 additions & 0 deletions accessibility-checker-extension/achecker.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
module.exports = {
// optional - Specify the rule archive
// Default: latest
// Run `npx achecker archives` for a list of valid ruleArchive ids and policy ids
ruleArchive: '12October2023',

// optional - Specify one or many policies to scan.
// Run `npx achecker archives` for a list of valid ruleArchive ids and policy ids
policies: [ "IBM_Accessibility"],

// optional - Specify one or many violation levels on which to fail the test
// i.e. If specified violation then the testcase will only fail if
// a violation is found during the scan.
// i.e. failLevels: ["violation"]
// i.e. failLevels: ["violation","potential violation"] or refer to below as a list
// Default: ["violation","potential violation"]
failLevels: [ "violation" ],

// optional - Specify one or many violation levels which should be reported
// i.e. If specified violation then in the report it would only contain
// results which are level of violation.
// i.e. reportLevels: ["violation"]
// Valid values: violation, potentialviolation, recommendation, potentialrecommendation, manual
// Default: ["violation","potential violation"]
reportLevels: [
"violation"
],

// Optional - Which type should the results be outputted to
// Valid values: json, csv, disable
// Default: json
outputFormat: [ "json" ],

// Optional - Specify labels that you would like associated to your scan
//
// i.e.
// label: ["Firefox","master","V12","Linux"]
// Default: N/A
label: [],

// optional - Where the scan results should be saved.
// Default: results
outputFolder: ".achecker/results",

// optional - Where the baseline results should be loaded from
// Default: baselines
baselineFolder: ".achecker/baselines",
}
Loading