Skip to content

Commit

Permalink
Enable excessibility checking of login menu, and remove unnecessary e…
Browse files Browse the repository at this point in the history
…xclusion from header
  • Loading branch information
tdonohue committed Aug 29, 2023
1 parent 158ebb0 commit 339ed63
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
3 changes: 1 addition & 2 deletions cypress/e2e/header.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ describe('Header', () => {
testA11y({
include: ['ds-header'],
exclude: [
['#search-navbar-container'], // search in navbar has duplicative ID. Will be fixed in #1174
['.dropdownLogin'] // "Log in" link has color contrast issues. Will be fixed in #1149
['#search-navbar-container'] // search in navbar has duplicative ID. Will be fixed in #1174
],
});
});
Expand Down
12 changes: 12 additions & 0 deletions cypress/e2e/login-modal.cy.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { TEST_ADMIN_PASSWORD, TEST_ADMIN_USER, TEST_ENTITY_PUBLICATION } from 'cypress/support/e2e';
import { testA11y } from 'cypress/support/utils';

const page = {
openLoginMenu() {
Expand Down Expand Up @@ -123,4 +124,15 @@ describe('Login Modal', () => {
cy.location('pathname').should('eq', '/forgot');
cy.get('ds-forgot-email').should('exist');
});

it('should pass accessibility tests', () => {
cy.visit('/');

page.openLoginMenu();

cy.get('ds-log-in').should('exist');

// Analyze <ds-log-in> for accessibility issues
testA11y('ds-log-in');
});
});

0 comments on commit 339ed63

Please sign in to comment.