-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into USAGOV-2095-menu-block-cache
- Loading branch information
Showing
16 changed files
with
4,124 additions
and
291 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
name: Prod A11Y Regression Tests | ||
on: workflow_dispatch | ||
jobs: | ||
run-regression-tests: | ||
name: run-regression-tests | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set env | ||
run: echo "CYPRESS_BASE_URL=https://usa.gov/" >> $GITHUB_ENV | ||
- name: Cypress run | ||
uses: cypress-io/github-action@v6 | ||
with: | ||
working-directory: automated_tests/e2e-cypress | ||
spec: cypress/e2e/regression_testing/*.cy.js |
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,16 @@ | ||
name: Stage A11Y Regression Tests | ||
on: workflow_dispatch | ||
jobs: | ||
run-regression-tests: | ||
name: run-regression-tests | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Set env | ||
run: echo "CYPRESS_BASE_URL=https://beta-stage.usa.gov/" >> $GITHUB_ENV | ||
- name: Cypress run | ||
uses: cypress-io/github-action@v6 | ||
with: | ||
working-directory: automated_tests/e2e-cypress | ||
spec: cypress/e2e/regression_testing/*.cy.js |
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 |
---|---|---|
|
@@ -3,10 +3,13 @@ const paths = ["/", "/es"]; | |
|
||
paths.forEach((path, idx) => { | ||
let lang; | ||
let testName; | ||
if (path === "/") { | ||
lang = "English"; | ||
testName = "BTE"; | ||
} else { | ||
lang = "Español"; | ||
testName = "BTS"; | ||
} | ||
describe(`${lang} Footer`, () => { | ||
beforeEach(() => { | ||
|
@@ -15,7 +18,7 @@ paths.forEach((path, idx) => { | |
}); | ||
|
||
|
||
it(`BTE/S 12: Footer links appear and work appropriately`, () => { | ||
it(`${testName} 12: Footer links appear and work appropriately`, () => { | ||
cy.get(".usa-footer__nav") | ||
.find("a") | ||
.not('[href="/website-analytics/"]') | ||
|
@@ -29,7 +32,7 @@ paths.forEach((path, idx) => { | |
}); | ||
|
||
|
||
it("BTE/S 13: Footer: Email subscription form appears in footer and works appropriately", () => { | ||
it(`${testName} 13: Footer: Email subscription form appears in footer and works appropriately`, () => { | ||
const validEmail = "[email protected]"; | ||
const invalidEmails = ["test@#$1123", "test2@", "@test3.com"]; | ||
const emails = [ | ||
|
@@ -52,7 +55,7 @@ paths.forEach((path, idx) => { | |
|
||
// Origin URL should now be connect.usa.gov | ||
const sentArgs = { email: validEmail }; | ||
cy.origin(emails[idx], { args: sentArgs }, ({ email }) => { | ||
cy.visit(emails[idx], { args: sentArgs }, ({ email }) => { | ||
cy.get("input").filter('[name="email"]').should("have.value", email); | ||
}); | ||
|
||
|
@@ -63,13 +66,13 @@ paths.forEach((path, idx) => { | |
cy.get(".usa-sign-up").find('button[type="submit"]').click(); | ||
|
||
// Origin URL should now be connect.usa.gov | ||
cy.origin(emails[idx], { args: sentArgs }, ({ email }) => { | ||
cy.visit(emails[idx], { args: sentArgs }, ({ email }) => { | ||
cy.get("input").filter('[name="email"]').should("have.value", email); | ||
}); | ||
}); | ||
|
||
|
||
it("BTE/S 14: Footer: Social media icons appear in footer and link to correct places", () => { | ||
it(`${testName} 14: Footer: Social media icons appear in footer and link to correct places`, () => { | ||
cy.get(".usa-footer__contact-links") | ||
.within(() => { | ||
// Verify correct text in social media heading | ||
|
@@ -102,7 +105,7 @@ paths.forEach((path, idx) => { | |
}); | ||
|
||
|
||
it("BTE/S 15: Footer: Contact Center information appears in footer and phone number links are correct", () => { | ||
it(`${testName} 15: Footer: Contact Center information appears in footer and phone number links are correct`, () => { | ||
cy.get("#footer-phone").within(() => { | ||
cy.get("h4") | ||
.should("have.text", fixtures.contact_heading[idx]) | ||
|
@@ -118,7 +121,7 @@ paths.forEach((path, idx) => { | |
}); | ||
|
||
|
||
it("BTE/S 16: Footer: Subfooter indicating USAGov is official site appears at very bottom", () => { | ||
it(`${testName} 16: Footer: Subfooter indicating USAGov is official site appears at very bottom`, () => { | ||
cy.get(".usa-identifier__section--usagov") | ||
.should("have.attr", "aria-label", fixtures.official_guide[idx]) | ||
.find(".usa-identifier__identity") | ||
|
Oops, something went wrong.