svgedit/cypress/integration/ui/accessibility.js

41 lines
1.0 KiB
JavaScript
Raw Normal View History

describe('UI - Accessibility', function () {
beforeEach(() => {
2020-08-06 19:46:30 +00:00
cy.visit('/instrumented/editor');
cy.injectAxe();
});
// https://www.npmjs.com/package/cypress-axe
it('Has no detectable a11y violations on load', () => {
// Configure aXe and test the page at initial load
cy.configureAxe({
// Todo: Reenable when have time to fix
// See https://www.deque.com/axe/axe-for-web/documentation/api-documentation/#user-content-parameters-1
rules: [{
id: 'meta-viewport',
enabled: false
}]
/*
branding: {
brand: String,
application: String
},
reporter: 'option',
checks: [Object],
rules: [Object],
locale: Object
*/
});
2020-07-26 18:11:18 +00:00
cy.checkA11y(
{},
{
rules: {
2020-07-31 23:23:28 +00:00
'label-title-only': {enabled: false},
'page-has-heading-one': {enabled: false},
region: {enabled: false},
'scrollable-region-focusable': {enabled: false}
2020-07-26 18:11:18 +00:00
}
2020-07-31 23:23:28 +00:00
}
);
});
});