axe-playwright
Advanced tools
Comparing version 2.0.1 to 2.0.2
@@ -52,3 +52,5 @@ "use strict"; | ||
const injectAxe = (page) => __awaiter(void 0, void 0, void 0, function* () { | ||
const axe = fs.readFileSync(require.resolve('axe-core/axe.min.js'), 'utf8'); | ||
const axe = fs.readFileSync(require.resolve('axe-core/axe.min.js'), { | ||
encoding: 'utf8', | ||
}); | ||
yield page.evaluate((axe) => window.eval(axe), axe); | ||
@@ -55,0 +57,0 @@ }); |
{ | ||
"name": "axe-playwright", | ||
"version": "2.0.1", | ||
"version": "2.0.2", | ||
"description": "Custom Playwright commands to inject axe-core and test for a11y", | ||
@@ -37,3 +37,3 @@ "main": "dist/index.js", | ||
"jest-playwright-preset": "^2.0.0", | ||
"playwright": "^1.27.1", | ||
"playwright": "^1.45.0", | ||
"prettier": "^2.7.1", | ||
@@ -40,0 +40,0 @@ "ts-jest": "^28.0.8", |
@@ -5,8 +5,11 @@ ![logo](./docs/logo.png) | ||
[![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) | ||
![Test Status](https://github.com/abhinaba-ghosh/axe-playwright/actions/workflows/tests.yml/badge.svg?branch=master) | ||
![Build Status](https://github.com/abhinaba-ghosh/axe-playwright/actions/workflows/npm-release.yml/badge.svg?branch=master) | ||
[![NPM release](https://img.shields.io/npm/v/axe-playwright.svg 'NPM release')](https://www.npmjs.com/package/axe-playwright) | ||
[![NPM Downloads](https://img.shields.io/npm/dt/axe-playwright.svg?style=flat-square)](https://www.npmjs.com/package/axe-playwright) | ||
[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. | ||
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. | ||
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. | ||
## Install and configure | ||
@@ -26,3 +29,3 @@ | ||
**NOTE:** _axe-core is now bundled and doesn't need to be installed as a peer dependency_ | ||
NOTE: axe-core® is now bundled and doesn't need to be installed separately. | ||
@@ -44,3 +47,3 @@ ### Add Typings | ||
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. | ||
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. | ||
@@ -47,0 +50,0 @@ You run this command with `injectAxe()` either in your test, or in a `beforeEach`, as long as the `visit` comes first. |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
38475
553
346
0