axe-playwright 2.0.3 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
+
5
+ ## [2.2.0](https://github.com/abhinaba-ghosh/axe-playwright/compare/v2.1.0...v2.2.0) (2025-09-09)
6
+
7
+
8
+ ### Features
9
+
10
+ * added chnagelog ([2f20011](https://github.com/abhinaba-ghosh/axe-playwright/commit/2f2001164befa5bb708e694242e1b76212f211ce))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * change reporter conditionals in `checkA11y()` to fix `skipFailure` options not working when reporter is 'junit' ([b4514d0](https://github.com/abhinaba-ghosh/axe-playwright/commit/b4514d043ed747ab7079241f3dbb3670e12ce2f0))
16
+
17
+ # changelog
package/README.md CHANGED
@@ -1,5 +1,3 @@
1
- ![logo](./docs/logo.png)
2
-
3
1
  # Axe-Playwright
4
2
 
5
3
  ![Test Status](https://github.com/abhinaba-ghosh/axe-playwright/actions/workflows/tests.yml/badge.svg?branch=master)
@@ -340,6 +338,25 @@ await checkA11y(
340
338
  },
341
339
  )
342
340
  ```
341
+
342
+ ### Accessibility Standards
343
+
344
+ To ensure your tests meet accessibility standards, configure axe-playwright with the following options:
345
+
346
+ ```js
347
+ await checkA11y(page, '#storybook-root', {
348
+ detailedReport: true,
349
+ detailedReportOptions: {
350
+ html: true,
351
+ },
352
+ verbose: false,
353
+ axeOptions: {
354
+ runOnly: ['wcag21aa', 'wcag22aa', 'best-practice', 'EN-301-549']
355
+ }
356
+ }, true, 'v2');
357
+ ```
358
+
359
+
343
360
  ## Before you Go
344
361
 
345
362
  If it works for you , leave a [Star](https://github.com/abhinaba-ghosh/axe-playwright)! :star:
package/dist/index.js CHANGED
@@ -123,6 +123,7 @@ const checkA11y = (page_1, ...args_1) => __awaiter(void 0, [page_1, ...args_1],
123
123
  results: { violations },
124
124
  options,
125
125
  });
126
+ (0, utils_1.testResultDependsOnViolations)(violations, skipFailures);
126
127
  }
127
128
  else
128
129
  console.log('There were no violations to save in report');
@@ -136,9 +137,9 @@ const checkA11y = (page_1, ...args_1) => __awaiter(void 0, [page_1, ...args_1],
136
137
  else {
137
138
  reporterWithOptions = reporter;
138
139
  }
139
- if (reporter !== 'html')
140
+ if (reporter !== 'html' && reporter !== 'junit')
140
141
  yield (0, exports.reportViolations)(impactedViolations, reporterWithOptions);
141
- if (reporter === 'v2' || (reporter !== 'html' && reporter !== 'junit'))
142
+ if (reporter === 'v2' || (reporter !== 'html'))
142
143
  (0, utils_1.testResultDependsOnViolations)(impactedViolations, skipFailures);
143
144
  });
144
145
  exports.checkA11y = checkA11y;
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "axe-playwright",
3
- "version": "2.0.3",
3
+ "version": "2.2.0",
4
4
  "description": "Custom Playwright commands to inject axe-core and test for a11y",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "files": [
8
8
  "dist/**/*",
9
- "README.md"
9
+ "README.md",
10
+ "CHANGELOG.md"
10
11
  ],
11
12
  "keywords": [
12
13
  "a11y",
@@ -18,10 +19,17 @@
18
19
  "scripts": {
19
20
  "prebuild": "rm -rf dist",
20
21
  "build": "tsc",
21
- "test": "jest",
22
+ "test": "npm run test:unit && npm run test:integration",
23
+ "test:unit": "jest test/unit --testEnvironment=node",
24
+ "test:integration": "jest test/integration",
22
25
  "format": "npx prettier --write .",
23
26
  "prerelease": "npm run build",
24
- "release": "npm cache clean --force && npm version patch && npm publish --force"
27
+ "release": "standard-version",
28
+ "release:patch": "standard-version --release-as patch",
29
+ "release:minor": "standard-version --release-as minor",
30
+ "release:major": "standard-version --release-as major",
31
+ "release:first": "standard-version --first-release",
32
+ "publish:npm": "npm publish"
25
33
  },
26
34
  "peerDependencies": {
27
35
  "playwright": ">1.0.0"
@@ -30,21 +38,22 @@
30
38
  "license": "MIT",
31
39
  "devDependencies": {
32
40
  "@types/jest": "^29.5.13",
33
- "@types/node": "^22.7.2",
41
+ "@types/node": "^22.7.8",
34
42
  "jest": "^29.7.0",
35
43
  "jest-each": "^29.7.0",
36
44
  "jest-playwright-preset": "^4.0.0",
37
- "playwright": "^1.47.2",
45
+ "playwright": "^1.48.1",
38
46
  "prettier": "^3.3.3",
47
+ "standard-version": "^9.5.0",
39
48
  "ts-jest": "^29.2.5",
40
- "typescript": "^5.6.2"
49
+ "typescript": "^5.6.3"
41
50
  },
42
51
  "dependencies": {
43
52
  "@types/junit-report-builder": "^3.0.2",
44
- "axe-core": "^4.10.0",
53
+ "axe-core": "^4.10.1",
45
54
  "axe-html-reporter": "2.2.11",
46
55
  "junit-report-builder": "^5.1.1",
47
- "picocolors": "^1.1.0"
56
+ "picocolors": "^1.1.1"
48
57
  },
49
58
  "repository": {
50
59
  "type": "git",
@@ -58,5 +67,11 @@
58
67
  "singleQuote": true,
59
68
  "trailingComma": "all",
60
69
  "semi": false
70
+ },
71
+ "standard-version": {
72
+ "skip": {
73
+ "commit": false,
74
+ "tag": false
75
+ }
61
76
  }
62
77
  }