1
0

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

@@ -20,18 +20,13 @@ describe('Homepage', () => {
cy.url().should('include', 'query=' + encodeURI(queryString));
});
// it('should pass accessibility tests', () => {
// // first must inject Axe into current page
// cy.injectAxe();
it('should pass accessibility tests', () => {
cy.injectAxe();
// // Analyze entire page for accessibility issues
// // NOTE: this test checks accessibility of header/footer as well
// cy.checkA11y({
// exclude: [
// ['#klaro'], // Klaro plugin (privacy policy popup) has color contrast issues
// ['#search-navbar-container'], // search in navbar has duplicative ID. Will be fixed in #1174
// ['.dropdownLogin'] // "Log in" link in header has color contrast issues
// ],
// });
// });
// Wait for homepage tag to appear
cy.get('ds-home-page').should('be.visible');
// Analyze <ds-home-page> for accessibility issues
cy.checkA11y('ds-home-page');
});
});