testcafe-community / axe Goto Github PK
View Code? Open in Web Editor NEWThis project forked from helen-dikareva/axe-testcafe
The helper for using Axe in TestCafe tests
This project forked from helen-dikareva/axe-testcafe
The helper for using Axe in TestCafe tests
Is it possible to generate a report highlighting the react selector specifically as the point at which an Axe violation happens?
Have tried using elementRef: true
to check if this helps, but encountering issues related to an error as such:
1) with cannot return DOM elements. Use Selector functions for this purpose.
The code I'm using is as follows:
import { axeCheck } from '@testcafe-community/axe';
import { createHtmlReport } from 'axe-html-reporter';
import { Selector } from 'testcafe';
export const Accessibility = {
scanPage: async(t, pageName) => {
const context = { exclude: Selector('select') };
const options = { rules: { 'document-title': { enabled: false } }, elementRef: true };
// Run axe check, not using wrapper function that throws error
const { error, results } = await axeCheck(t, context, options); // "context" and "options" parameters are optional
console.log(`error: ${error}`);
// "results" constant contains full axe Results object (https://www.deque.com/axe/core-documentation/api-documentation/#results-object)
await t.expect(error).eql(null, `axe check failed with an error: ${error}`);
createHtmlReport({
results,
options: {
projectKey: `"${pageName}"`,
outputDir: 'reports/artifacts/' + pageName
}
});
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.