axe-playwright 2.1.0 → 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
@@ -137,9 +137,9 @@ const checkA11y = (page_1, ...args_1) => __awaiter(void 0, [page_1, ...args_1],
137
137
  else {
138
138
  reporterWithOptions = reporter;
139
139
  }
140
- if (reporter !== 'html')
140
+ if (reporter !== 'html' && reporter !== 'junit')
141
141
  yield (0, exports.reportViolations)(impactedViolations, reporterWithOptions);
142
- if (reporter === 'v2' || (reporter !== 'html' && reporter !== 'junit'))
142
+ if (reporter === 'v2' || (reporter !== 'html'))
143
143
  (0, utils_1.testResultDependsOnViolations)(impactedViolations, skipFailures);
144
144
  });
145
145
  exports.checkA11y = checkA11y;
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "axe-playwright",
3
- "version": "2.1.0",
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"
@@ -36,6 +44,7 @@
36
44
  "jest-playwright-preset": "^4.0.0",
37
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
49
  "typescript": "^5.6.3"
41
50
  },
@@ -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
  }