Skip to content

Commit

Permalink
Vote-2827: Migrate axe test to utlitize page objects (#995)
Browse files Browse the repository at this point in the history
  • Loading branch information
clmedders authored Sep 20, 2024
1 parent 556569c commit 4fd3ea8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions testing/cypress/e2e/accessibility/axe.cy.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
/// <reference types="cypress" />

import { pageObjects } from '../../support/pageObjects.js'

// the function below allows for axe to put the failer message into a table that is locted in the terminal after the test is run

function terminalLog(violations) {
Expand Down Expand Up @@ -50,7 +52,10 @@ describe("Run AXE core on site pages", () => {
cy.visit({
url: page.route,
});
cy.get('[class="usa-banner__button-text"]').click()

pageObjects
.headerButton()
.click()
cy.injectAxe()
cy.configureAxe({
runOnly: {
Expand All @@ -63,4 +68,3 @@ describe("Run AXE core on site pages", () => {
);
});


0 comments on commit 4fd3ea8

Please sign in to comment.