-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
260 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
describe("404 Error Page", () => { | ||
beforeEach(() => { | ||
cy.visit("/404", { failOnStatusCode: false }); | ||
cy.injectAxe(); | ||
}); | ||
|
||
it("has no a11y violations", () => { | ||
cy.checkA11y(); | ||
}); | ||
|
||
it("page loaded", () => { | ||
cy.url().should("equal", Cypress.config().baseUrl + "/en/404"); | ||
}); | ||
|
||
it("navigates to english homepage", () => { | ||
cy.get('a[href*="/en/home"]').click(); | ||
cy.url().should("equal", Cypress.config().baseUrl + "/en/home"); | ||
}); | ||
|
||
it("navigates to french homepage", () => { | ||
cy.get('a[href*="fr/accueil"]').click(); | ||
cy.url().should("equal", Cypress.config().baseUrl + "/fr/accueil"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
describe("500 Error Page", () => { | ||
beforeEach(() => { | ||
cy.visit("/500", { failOnStatusCode: false }); | ||
cy.injectAxe(); | ||
}); | ||
|
||
it("has no a11y violations", () => { | ||
cy.checkA11y(); | ||
}); | ||
|
||
it("page loaded", () => { | ||
cy.url().should("equal", Cypress.config().baseUrl + "/en/500"); | ||
}); | ||
|
||
it("navigates to english homepage", () => { | ||
cy.get('a[href*="/en/home"]').click(); | ||
cy.url().should("equal", Cypress.config().baseUrl + "/en/home"); | ||
}); | ||
|
||
it("navigates to french homepage", () => { | ||
cy.get('a[href*="fr/accueil"]').click(); | ||
cy.url().should("equal", Cypress.config().baseUrl + "/fr/accueil"); | ||
}); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
describe("Home Page", () => { | ||
beforeEach(() => { | ||
cy.visit("/en/projects/benefits-navigator"); | ||
cy.injectAxe(); | ||
}); | ||
|
||
it("has no a11y violations", () => { | ||
cy.checkA11y(); | ||
}); | ||
|
||
it("loads page",()=>{ | ||
cy.url().should('equal',Cypress.config().baseUrl+'/en/projects/benefits-navigator') | ||
cy.get('button.info').click() | ||
cy.get('h2.modal-title').should('have.text','Alpha') | ||
}) | ||
|
||
it("navigates to a project page", () => { | ||
cy.get("a[href*=difficulties-community]").click(); | ||
cy.url().should( | ||
"equal", | ||
Cypress.config().baseUrl + "/en/projects/benefits-navigator/difficulties-community-workers-help-people-benefits" | ||
); | ||
}); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
describe("Digital Standards Playbook Page", () => { | ||
beforeEach(() => { | ||
cy.visit("/en/projects/digital-standards-playbook"); | ||
cy.injectAxe(); | ||
}); | ||
|
||
it("has no a11y violations", () => { | ||
cy.checkA11y(); | ||
}); | ||
|
||
it("loads page",()=>{ | ||
cy.url().should('equal',Cypress.config().baseUrl+'/en/projects/digital-standards-playbook') | ||
cy.get('button.info').click() | ||
cy.get('h2.modal-title').should('have.text','Discovery') | ||
}) | ||
|
||
it("finds survey page", () => { | ||
cy.get("a:contains('Take survey')").should('be.visible'); | ||
}); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
describe("Error Page", () => { | ||
beforeEach(() => { | ||
cy.visit("/error", { failOnStatusCode: false }); | ||
cy.injectAxe(); | ||
}); | ||
|
||
it("has no a11y violations", () => { | ||
cy.checkA11y(); | ||
}); | ||
|
||
it("page loaded", () => { | ||
cy.url().should("equal", Cypress.config().baseUrl + "/en/error"); | ||
}); | ||
|
||
it("navigates to english homepage", () => { | ||
cy.get('a[href*="/en/home"]').click(); | ||
cy.url().should("equal", Cypress.config().baseUrl + "/en/home"); | ||
}); | ||
|
||
it("navigates to french homepage", () => { | ||
cy.get('a[href*="fr/accueil"]').click(); | ||
cy.url().should("equal", Cypress.config().baseUrl + "/fr/accueil"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,23 @@ | ||
import terminalLog from "../plugins/terminalLog"; | ||
|
||
/* eslint-disable no-undef */ | ||
/// <reference types="Cypress" /> | ||
|
||
describe("home page", () => { | ||
describe("Home page", () => { | ||
beforeEach(() => { | ||
cy.visit("/home"); | ||
cy.visit("/en/home"); | ||
cy.injectAxe(); | ||
}); | ||
|
||
it("landing page loaded", () => { | ||
cy.url().should("contains", "/home"); | ||
}); | ||
|
||
it("Has no detectable a11y violations on load", () => { | ||
cy.checkA11y(null, null, terminalLog); | ||
}); | ||
|
||
it("Toggles content language when language button is clicked", () => { | ||
cy.get('[data-cy="toggle-language-link"]').then(($link) => { | ||
const txt = $link.text(); | ||
cy.get('[data-cy="toggle-language-link"]').click(); | ||
cy.get('[data-cy="toggle-language-link"]').should(($link2) => { | ||
expect($link2.text()).not.to.eq(txt); | ||
}); | ||
}); | ||
it("has no a11y violations", () => { | ||
cy.checkA11y(); | ||
}); | ||
|
||
it("Adds subpath for french pages", () => { | ||
cy.get('[data-cy="toggle-language-link"]').click(); | ||
cy.url().should("eq", "http://localhost:3000/fr/accueil"); | ||
}); | ||
/* Commenting out the below for now to look into since it doesn't seem to be working with AEM | ||
it("See projects button goes to projects page (button at the bottom of the content)", () => { | ||
cy.get('[dataCy="HOMEPAGE-VIEW-PROJECTS"]').click(); | ||
cy.url().should("include", "/projects"); | ||
}); | ||
it("See about button goes to about page (button at the bottom of the content)", () => { | ||
cy.get('[dataCy="AboutButton"]').click(); | ||
cy.url().should("include", "/about"); | ||
}); | ||
it("toggles language",()=>{ | ||
cy.get("a:contains('Français')").click() | ||
cy.url().should('equal',Cypress.config().baseUrl+'/fr/accueil') | ||
}) | ||
|
||
it("See signup button (not in the nav menu) goes to signup page", () => { | ||
cy.get('[dataCy="SIGN-UP-TO-GET-INVITED-TO-RESEARCH-SESSIONS"]').click(); | ||
cy.url().should("include", "/signup"); | ||
it("navigates to a project page", () => { | ||
cy.get("a[href*=benefits-navigator]").click(); | ||
cy.url().should( | ||
"equal", | ||
Cypress.config().baseUrl + "/en/projects/benefits-navigator" | ||
); | ||
}); | ||
*/ | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
describe("Index Page", () => { | ||
beforeEach(() => { | ||
cy.visit("/"); | ||
cy.injectAxe() | ||
}); | ||
|
||
it("has no a11y violations",()=>{ | ||
cy.checkA11y() | ||
}) | ||
|
||
it("index page loaded", () => { | ||
cy.url().should('equal',Cypress.config().baseUrl+'/') | ||
}); | ||
|
||
it("navigates to english homepage",() => { | ||
cy.get('#english-button').click() | ||
cy.url().should('equal',Cypress.config().baseUrl+'/en/home') | ||
}) | ||
|
||
it("navigates to french homepage",() => { | ||
cy.get('#french-button').click() | ||
cy.url().should('equal',Cypress.config().baseUrl+'/fr/accueil') | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
describe("MSCA Dashboard Page", () => { | ||
beforeEach(() => { | ||
cy.visit("/en/projects/dashboard"); | ||
cy.injectAxe(); | ||
}); | ||
|
||
it("has no a11y violations", () => { | ||
cy.checkA11y(); | ||
}); | ||
|
||
it("loads page",()=>{ | ||
cy.url().should('equal',Cypress.config().baseUrl+'/en/projects/dashboard') | ||
cy.get('button.info').click() | ||
cy.get('h2.modal-title').should('have.text','Alpha') | ||
}) | ||
|
||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
describe("Not Supported Page", () => { | ||
beforeEach(() => { | ||
cy.visit("/notsupported", { failOnStatusCode: false }); | ||
cy.injectAxe(); | ||
}); | ||
|
||
it("has no a11y violations", () => { | ||
cy.checkA11y(); | ||
}); | ||
|
||
it("page loaded", () => { | ||
cy.url().should("equal", Cypress.config().baseUrl + "/en/notsupported"); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
describe("OAS Estimator Page", () => { | ||
beforeEach(() => { | ||
cy.visit("/en/projects/oas-benefits-estimator"); | ||
cy.injectAxe(); | ||
}); | ||
|
||
it("has no a11y violations", () => { | ||
cy.checkA11y(); | ||
}); | ||
|
||
it("loads page",()=>{ | ||
cy.url().should('equal',Cypress.config().baseUrl+'/en/projects/oas-benefits-estimator') | ||
cy.get('button.info').click() | ||
cy.get('h2.modal-title').should('have.text','Beta') | ||
}) | ||
|
||
it("navigates to a project page", () => { | ||
cy.get("a[href*=what-we-learned]").click(); | ||
cy.url().should( | ||
"equal", | ||
Cypress.config().baseUrl + "/en/projects/oas-benefits-estimator/what-we-learned" | ||
); | ||
}); | ||
}); | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.