axe-playwright 2.0.1 → 2.0.2

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/README.md CHANGED
@@ -2,11 +2,14 @@
2
2
 
3
3
  # Axe-Playwright
4
4
 
5
- [![Build Status](https://circleci.com/gh/abhinaba-ghosh/axe-playwright.svg?style=shield&branch-=master)](https://app.circleci.com/pipelines/github/abhinaba-ghosh/axe-playwright)
5
+ ![Test Status](https://github.com/abhinaba-ghosh/axe-playwright/actions/workflows/tests.yml/badge.svg?branch=master)
6
+ ![Build Status](https://github.com/abhinaba-ghosh/axe-playwright/actions/workflows/npm-release.yml/badge.svg?branch=master)
6
7
  [![NPM release](https://img.shields.io/npm/v/axe-playwright.svg 'NPM release')](https://www.npmjs.com/package/axe-playwright)
7
8
  [![NPM Downloads](https://img.shields.io/npm/dt/axe-playwright.svg?style=flat-square)](https://www.npmjs.com/package/axe-playwright)
8
9
 
9
- [Axe](https://www.deque.com/axe/) is an accessibility testing engine for websites and other HTML-based user interfaces. This package provides simple axe analyser commands which you can incorporate in your [Playwright](https://www.npmjs.com/package/playwright) tests. [Axe](https://www.deque.com/axe/) seamlessly functions across all Playwright browsers: Chromium, Firefox, and WebKit.
10
+ Axe-core® is a powerful accessibility testing engine provided by Deque Systems that powers this package. Axe-Playwright provides simple commands to integrate the axe-core® library with your [Playwright](https://www.npmjs.com/package/playwright) tests. This integration functions seamlessly across all Playwright browsers: Chromium, Firefox, and WebKit.
11
+
12
+ Axe-core® is a trademark of [Deque Systems, Inc.](https://www.deque.com/) in the US and other countries. This project is not formally affiliated with Deque, but we are big fans! Axe-core® is used here with permission.
10
13
 
11
14
  ## Install and configure
12
15
 
@@ -22,7 +25,7 @@ npm i -D axe-playwright
22
25
  npm i -D playwright
23
26
  ```
24
27
 
25
- **NOTE:** _axe-core is now bundled and doesn't need to be installed as a peer dependency_
28
+ NOTE: axe-core® is now bundled and doesn't need to be installed separately.
26
29
 
27
30
  ### Add Typings
28
31
 
@@ -39,7 +42,7 @@ npm i -D playwright
39
42
 
40
43
  ### injectAxe
41
44
 
42
- This will inject the `axe-core` runtime into the page under test. You must run this **after** a call to `page.goto()` and before you run the `checkA11y` command.
45
+ This will inject the axe-core® runtime into the page under test. You must run this after a call to page.goto() and before you run the checkA11y command.
43
46
 
44
47
  You run this command with `injectAxe()` either in your test, or in a `beforeEach`, as long as the `visit` comes first.
45
48
 
package/dist/index.js CHANGED
@@ -49,7 +49,9 @@ const path = __importStar(require("path"));
49
49
  * @param page
50
50
  */
51
51
  const injectAxe = (page) => __awaiter(void 0, void 0, void 0, function* () {
52
- const axe = fs.readFileSync(require.resolve('axe-core/axe.min.js'), 'utf8');
52
+ const axe = fs.readFileSync(require.resolve('axe-core/axe.min.js'), {
53
+ encoding: 'utf8',
54
+ });
53
55
  yield page.evaluate((axe) => window.eval(axe), axe);
54
56
  });
55
57
  exports.injectAxe = injectAxe;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "axe-playwright",
3
- "version": "2.0.1",
3
+ "version": "2.0.2",
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",
@@ -34,7 +34,7 @@
34
34
  "jest": "^28.1.3",
35
35
  "jest-each": "^28.1.3",
36
36
  "jest-playwright-preset": "^2.0.0",
37
- "playwright": "^1.27.1",
37
+ "playwright": "^1.45.0",
38
38
  "prettier": "^2.7.1",
39
39
  "ts-jest": "^28.0.8",
40
40
  "typescript": "^4.8.4"