@kinora/reporter 0.8.0 → 0.8.1

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.
Files changed (2) hide show
  1. package/README.md +22 -0
  2. package/package.json +4 -4
package/README.md CHANGED
@@ -71,6 +71,28 @@ Each mounted story id is recorded on the test as a `kinora:story` annotation. Al
71
71
 
72
72
  More in the [component testing guide](https://docs.kinora.dev/guides/component-testing/).
73
73
 
74
+ ## Accessibility
75
+
76
+ kinora records the axe scans attached to a test: the rules broken, their impact and the elements
77
+ they hit. `scanA11y` runs the scan with `@axe-core/playwright` (add it to your dev dependencies)
78
+ and attaches the result:
79
+
80
+ ```ts
81
+ import { scanA11y } from '@kinora/reporter/a11y'
82
+ import { expect, test } from '@playwright/test'
83
+
84
+ test('checkout is accessible', async ({ page }) => {
85
+ await page.goto('/checkout')
86
+ const { violations } = await scanA11y(page)
87
+ expect(violations).toEqual([]) // leave it out to record the violations as warnings
88
+ })
89
+ ```
90
+
91
+ A scan you build yourself works too, as long as it is attached to the test with
92
+ `testInfo.attach(name, { body: JSON.stringify(results), contentType: 'application/json' })`.
93
+ An assertion alone is invisible to a reporter. More in the
94
+ [accessibility guide](https://docs.kinora.dev/guides/reporter/#accessibility).
95
+
74
96
  ## Documentation
75
97
 
76
98
  Full reporter options, PR/MR comments, CI examples, and self-hosting are in the docs:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kinora/reporter",
3
3
  "type": "module",
4
- "version": "0.8.0",
4
+ "version": "0.8.1",
5
5
  "description": "Playwright reporter that uploads test results to a kinora server",
6
6
  "author": "Joris Gallot",
7
7
  "license": "MIT",
@@ -44,16 +44,16 @@
44
44
  }
45
45
  },
46
46
  "dependencies": {
47
- "@kinora/core": "0.10.0"
47
+ "@kinora/core": "0.10.1"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@axe-core/playwright": "^4.13.0",
51
51
  "@playwright/test": "^1.64.0",
52
52
  "@types/node": "^26.6.5",
53
- "@vitest/coverage-v8": "^5.0.3",
53
+ "@vitest/coverage-v8": "^5.0.4",
54
54
  "tsdown": "^0.23.1",
55
55
  "typescript": "~6.0.3",
56
- "vitest": "^5.0.3"
56
+ "vitest": "^5.0.4"
57
57
  },
58
58
  "scripts": {
59
59
  "build": "tsdown",