Add logging for violations & testA11y() in utils.ts. Use that method everywhere else

This commit is contained in:
Tim Donohue
2021-09-13 17:11:53 -05:00
parent fad74a4ca2
commit 4faa850fba
16 changed files with 100 additions and 65 deletions

View File

@@ -1,13 +1,14 @@
import { testA11y } from 'cypress/support/utils';
describe('Header', () => {
it('should pass accessibility tests', () => {
cy.visit('/');
cy.injectAxe();
// Header must first be visible
cy.get('ds-header').should('be.visible');
// Analyze <ds-header> for accessibility
cy.checkA11y({
testA11y({
include: ['ds-header'],
exclude: [
['#search-navbar-container'], // search in navbar has duplicative ID. Will be fixed in #1174
@@ -15,4 +16,4 @@ describe('Header', () => {
],
});
});
});
});