Skip to content

Commit

Permalink
Merge pull request #1715 from IBMa/jest-extension-test
Browse files Browse the repository at this point in the history
chore(extension): Add jest testing to the extension
  • Loading branch information
ErickRenteria authored Oct 31, 2023
2 parents af5e085 + fc071f1 commit 60a6c8d
Show file tree
Hide file tree
Showing 14 changed files with 3,011 additions and 2,094 deletions.
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

0 comments on commit 60a6c8d

Please sign in to comment.