Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Commit

Permalink
add cypress a11y tests to all pages
Browse files Browse the repository at this point in the history
  • Loading branch information
gmrabian committed Mar 19, 2024
1 parent b6e172e commit 7119674
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/app/[id]/apply/confirmation/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default function ConfirmationPage({ params }: Props) {
</>
);

return <>{loading ? <Spinner /> : View}</>;
return <main>{loading ? <Spinner /> : View}</main>;
}

type Props = {
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/form/ApplicationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export const ApplicationForm = ({ institutionId }: Props) => {
</div>
);

return <>{loading ? <Spinner /> : ApplicationView}</>;
return <main>{loading ? <Spinner /> : ApplicationView}</main>;
};

type Props = {
Expand Down
11 changes: 11 additions & 0 deletions src/app/testing/cypress/e2e/applicationpage.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// 445027: id for American InterContinental University
const SELECTED_INSTITUTION_ROUTE = "/445027/apply";

describe("Test application page accessibility", () => {
it("Should not have any a11y issues on the application page", () => {
cy.visit(SELECTED_INSTITUTION_ROUTE);
// make sure info loads
cy.get(".application_header-title").should("be.visible");
cy.runAccessibilityTests();
});
});
11 changes: 11 additions & 0 deletions src/app/testing/cypress/e2e/confirmationpage.cy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// 445027: id for American InterContinental University
const SELECTED_INSTITUTION_ROUTE = "/445027/apply/confirmation";

describe("Test confirmation page accessibility", () => {
it("Should not have any a11y issues on the confirmation page", () => {
cy.visit(SELECTED_INSTITUTION_ROUTE);
// make sure info loads
cy.get(".application_header-title").should("be.visible");
cy.runAccessibilityTests();
});
});
2 changes: 1 addition & 1 deletion src/app/testing/cypress/e2e/detailspage.cy.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// 445027: id for American InterContinental University
const SELECTED_INSTITUTION_ROUTE = "/445027";

// 445027: id for American InterContinental University
describe("Test details page", () => {
it("should show expected sections", () => {
cy.visit(SELECTED_INSTITUTION_ROUTE);
Expand Down

0 comments on commit 7119674

Please sign in to comment.