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

feat(axe-core-4.0.1): bump axe-core from 3.5.5 to 4.0.1 #366

Merged
merged 6 commits into from
Aug 11, 2020
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ The [microsoft/axe-pipelines-samples](https://github.com/microsoft/axe-pipelines
The version number of this library is **independent** from the version numbers of the axe-core inputs and SARIF outputs it supports.
- axe-sarif-converter version 2.x supports input from version ^3.2.0 of axe-core (tested with 3.2.2, 3.3.2, 3.4.1, 3.4.2, 3.5.1, 3.5.2, 3.5.3, 3.5.4, and 3.5.5) and outputs SARIF v2.1
- axe-sarif-converter version 2.x supports input from version ^3.2.0 || ^4.0.0 of axe-core (tested with 3.2.2, 3.3.2, 3.4.1, 3.4.2, 3.5.1, 3.5.2, 3.5.3, 3.5.4, 3.5.5, and 4.0.1) and outputs SARIF v2.1
- axe-sarif-converter version 1.x supports input from version >= 3.2.0 < 3.3.0 of axe-core (tested with 3.2.2) and outputs SARIF v2.0
Note that the SARIF format _does not use semantic versioning_, and there are breaking changes between the v2.0 and v2.1 SARIF formats. If you need compatibility with a SARIF viewer that only supports v2.0, you should use version 1.x of this library.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"dependencies": {
"@types/sarif": ">=2.1.1 <=2.1.2",
"axe-core": "^3.2.2",
"axe-core": "^3.2.2 || ^4.0.0",
"yargs": "^15.0.2"
},
"devDependencies": {
Expand Down
8 changes: 4 additions & 4 deletions src/__snapshots__/index.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1386,15 +1386,15 @@ Object {
],
"tool": Object {
"driver": Object {
"downloadUri": "https://www.npmjs.com/package/axe-core/v/3.5.5",
"fullName": "axe for Web v3.5.5",
"downloadUri": "https://www.npmjs.com/package/axe-core/v/4.0.1",
"fullName": "axe for Web v4.0.1",
"informationUri": "https://www.deque.com/axe/axe-for-web/",
"name": "axe-core",
"properties": Object {
"microsoft/qualityDomain": "Accessibility",
},
"rules": Array [],
"semanticVersion": "3.5.5",
"semanticVersion": "4.0.1",
"shortDescription": Object {
"text": "An open source accessibility rules library for automated testing.",
},
Expand All @@ -1405,7 +1405,7 @@ Object {
"name": "WCAG",
},
],
"version": "3.5.5",
"version": "4.0.1",
},
},
},
Expand Down
2 changes: 2 additions & 0 deletions src/cli.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ describe('axe-sarif-converter CLI', () => {
${'w3citylights-axe-v3.5.4.axe-cli-v3.2.0.json'}
${'basic-axe-v3.5.5.axe-cli-v3.2.0.json'}
${'w3citylights-axe-v3.5.5.axe-cli-v3.2.0.json'}
${'basic-axe-v4.0.1.axe-cli-v3.2.0.json'}
${'w3citylights-axe-v4.0.1.axe-cli-v3.2.0.json'}
`(
'supports conversion from axe-cli output $inputFile',
async ({ inputFile }) => {
Expand Down
6 changes: 5 additions & 1 deletion src/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@ describe('public convertAxeToSarif API', () => {
${'basic-axe-v3.5.5.reporter-v2.json'} | ${'basic-axe-v3.5.5.sarif'}
${'w3citylights-axe-v3.5.5.reporter-v1.json'} | ${'w3citylights-axe-v3.5.5.sarif'}
${'w3citylights-axe-v3.5.5.reporter-v2.json'} | ${'w3citylights-axe-v3.5.5.sarif'}
${'basic-axe-v4.0.1.reporter-v1.json'} | ${'basic-axe-v4.0.1.sarif'}
${'basic-axe-v4.0.1.reporter-v2.json'} | ${'basic-axe-v4.0.1.sarif'}
${'w3citylights-axe-v4.0.1.reporter-v1.json'} | ${'w3citylights-axe-v4.0.1.sarif'}
${'w3citylights-axe-v4.0.1.reporter-v2.json'} | ${'w3citylights-axe-v4.0.1.sarif'}
`(
'converts pinned v1/v2 input $inputFile to pinned output $outputFile',
({ inputFile, outputFile }) => {
Expand Down Expand Up @@ -125,7 +129,7 @@ describe('public sarifReporter API', () => {
// it isn't very meaningful to test cases that involve old axe versions here.
it.each`
inputFile | outputFile
${'basic-axe-v3.5.5.reporter-raw.json'} | ${'basic-axe-v3.5.5.sarif'}
${'basic-axe-v4.0.1.reporter-raw.json'} | ${'basic-axe-v4.0.1.sarif'}
`(
'converts pinned raw input $inputFile to pinned output $outputFile',
async ({ inputFile, outputFile }) => {
Expand Down
68 changes: 68 additions & 0 deletions src/test-resources/basic-axe-v4.0.1.axe-cli-v3.2.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
[
{
"inapplicable": [],
"incomplete": [],
"passes": [],
"testEngine": {
"name": "axe-core",
"version": "4.0.1"
},
"testEnvironment": {
"orientationAngle": 0,
"orientationType": "landscape-primary",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/84.0.4147.125 Safari/537.36",
"windowHeight": 600,
"windowWidth": 800
},
"testRunner": {
"name": "axe"
},
"timestamp": "2020-08-10T23:42:05.017Z",
"toolOptions": {
"reporter": "v1",
"runOnly": {
"type": "rule",
"values": [
"document-title"
]
}
},
"url": "file:///C:/Users/davetryon/source/repos/axe-sarif-converter/master/src/test-resources/basic.html",
"violations": [
{
"description": "Ensures each HTML document contains a non-empty <title> element",
"help": "Documents must have <title> element to aid in navigation",
"helpUrl": "https://dequeuniversity.com/rules/axe/4.0/document-title?application=webdriverjs",
"id": "document-title",
"impact": "serious",
"nodes": [
{
"all": [],
"any": [
{
"data": null,
"id": "doc-has-title",
"impact": "serious",
"message": "Document does not have a non-empty <title> element",
"relatedNodes": []
}
],
"failureSummary": "Fix any of the following:\n Document does not have a non-empty <title> element",
"html": "<html class=\"deque-axe-is-ready\"><head></head><body>\n</body><script>document.documentElement.classList.add(\"deque-axe-is-ready\");</script></html>",
"impact": "serious",
"none": [],
"target": [
"html"
]
}
],
"tags": [
"cat.text-alternatives",
"wcag2a",
"wcag242",
"ACT"
]
}
]
}
]
49 changes: 49 additions & 0 deletions src/test-resources/basic-axe-v4.0.1.reporter-raw.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
[
{
"id": "document-title",
"result": "failed",
"pageLevel": false,
"impact": "serious",
"tags": [
"cat.text-alternatives",
"wcag2a",
"wcag242",
"ACT"
],
"description": "Ensures each HTML document contains a non-empty <title> element",
"help": "Documents must have <title> element to aid in navigation",
"helpUrl": "https://dequeuniversity.com/rules/axe/4.0/document-title?application=axe-puppeteer",
"inapplicable": [],
"passes": [],
"incomplete": [],
"violations": [
{
"any": [
{
"id": "doc-has-title",
"data": null,
"relatedNodes": [],
"impact": "serious",
"message": "Document does not have a non-empty <title> element"
}
],
"all": [],
"none": [],
"node": {
"selector": [
"html"
],
"source": "<html><head></head><body>\n</body></html>",
"xpath": [
"/html"
],
"ancestry": [
"html"
]
},
"impact": "serious",
"result": "failed"
}
]
}
]
70 changes: 70 additions & 0 deletions src/test-resources/basic-axe-v4.0.1.reporter-v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"testEngine": {
"name": "axe-core",
"version": "4.0.1"
},
"testRunner": {
"name": "axe"
},
"testEnvironment": {
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/83.0.4103.0 Safari/537.36",
"windowWidth": 800,
"windowHeight": 600,
"orientationAngle": 0,
"orientationType": "portrait-primary"
},
"timestamp": "2000-01-02T03:04:05.006Z",
"url": "http://localhost/",
"toolOptions": {
"xpath": true,
"runOnly": {
"type": "rule",
"values": [
"document-title"
]
},
"reporter": "v1"
},
"violations": [
{
"id": "document-title",
"impact": "serious",
"tags": [
"cat.text-alternatives",
"wcag2a",
"wcag242",
"ACT"
],
"description": "Ensures each HTML document contains a non-empty <title> element",
"help": "Documents must have <title> element to aid in navigation",
"helpUrl": "https://dequeuniversity.com/rules/axe/4.0/document-title?application=axe-puppeteer",
"nodes": [
{
"any": [
{
"id": "doc-has-title",
"data": null,
"relatedNodes": [],
"impact": "serious",
"message": "Document does not have a non-empty <title> element"
}
],
"all": [],
"none": [],
"impact": "serious",
"html": "<html><head></head><body>\n</body></html>",
"target": [
"html"
],
"xpath": [
"/html"
],
"failureSummary": "Fix any of the following:\n Document does not have a non-empty <title> element"
}
]
}
],
"passes": [],
"incomplete": [],
"inapplicable": []
}
69 changes: 69 additions & 0 deletions src/test-resources/basic-axe-v4.0.1.reporter-v2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"testEngine": {
"name": "axe-core",
"version": "4.0.1"
},
"testRunner": {
"name": "axe"
},
"testEnvironment": {
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) HeadlessChrome/83.0.4103.0 Safari/537.36",
"windowWidth": 800,
"windowHeight": 600,
"orientationAngle": 0,
"orientationType": "portrait-primary"
},
"timestamp": "2000-01-02T03:04:05.006Z",
"url": "http://localhost/",
"toolOptions": {
"xpath": true,
"runOnly": {
"type": "rule",
"values": [
"document-title"
]
},
"reporter": "v2"
},
"violations": [
{
"id": "document-title",
"impact": "serious",
"tags": [
"cat.text-alternatives",
"wcag2a",
"wcag242",
"ACT"
],
"description": "Ensures each HTML document contains a non-empty <title> element",
"help": "Documents must have <title> element to aid in navigation",
"helpUrl": "https://dequeuniversity.com/rules/axe/4.0/document-title?application=axe-puppeteer",
"nodes": [
{
"any": [
{
"id": "doc-has-title",
"data": null,
"relatedNodes": [],
"impact": "serious",
"message": "Document does not have a non-empty <title> element"
}
],
"all": [],
"none": [],
"impact": "serious",
"html": "<html><head></head><body>\n</body></html>",
"target": [
"html"
],
"xpath": [
"/html"
]
}
]
}
],
"passes": [],
"incomplete": [],
"inapplicable": []
}
Loading