Skip to content

Commit

Permalink
Fix failing requirements sidebar Cypress test (#697)
Browse files Browse the repository at this point in the history
* Add course that fulfills a req

* Fix timeout issue
  • Loading branch information
willespencer authored Jun 7, 2022
1 parent 273e51e commit e118d51
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion cypress/integration/accessibility-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,16 @@ it('Check navbar accessibility', () => {
// Check the accessibility of the requirements sidebar with all toggles fully open
// Note that the selector in checkA11y ensures only the sidebar is inspected
it('Check accessibility of the requirements sidebar', () => {
// Note that there must a completed requirement (i.e. swim test)
cy.get('[data-cyId=semester-addCourse]').click();
cy.get('[data-cyId=newCourse-dropdown]').type('PE 1100');
cy.get('[data-cyId=newCourse-searchResult]').first().click();
cy.get('[data-cyId=modal-button]').click();

// open all dropdowns in the sidebar
cy.get('[data-cyId=requirements-viewMore]').click({ multiple: true });
cy.get('[data-cyId=requirements-showCompleted]').click({ multiple: true });
cy.get('[data-cyId=requirements-displayToggle]').click({ multiple: true });
cy.get('[data-cyId=requirements-displayToggle]').click({ multiple: true, force: true });

cy.checkA11y('[data-cyId=reqsSidebar]');
});
Expand Down

0 comments on commit e118d51

Please sign in to comment.