Add basic accessibility scan for most public pages. Disable any a11y tests with known issues

This commit is contained in:
Tim Donohue
2021-08-27 17:27:41 -05:00
parent ee70baafd9
commit 3c35c6c8ae
13 changed files with 264 additions and 29 deletions

View File

@@ -0,0 +1,25 @@
import { Options } from "cypress-axe";
describe('Community List Page', () => {
it('should pass accessibility tests', () => {
cy.visit('/community-list');
cy.injectAxe();
// <ds-community-list-page> tag must be loaded
cy.get('ds-community-list-page').should('exist');
// Open first Community (to show Collections)...that way we scan sub-elements as well
cy.get('ds-community-list :nth-child(1) > .btn-group > .btn').click();
// Analyze <ds-community-list-page> for accessibility issues
// Disable heading-order checks until it is fixed
cy.checkA11y('ds-community-list-page',
{
rules: {
'heading-order': { enabled: false }
}
} as Options
);
});
});