From 238bcac41dc43aceb6805cb96a1371329d2fdc9f Mon Sep 17 00:00:00 2001 From: Jordan Date: Tue, 21 Jan 2025 12:11:51 -0500 Subject: [PATCH] Remove redundant accessibility tests - Deleted the accessibility test scripts from the Cypress test suite. - Removed related commands from package.json and Azure Pipelines YAML configuration. - This cleanup streamlines the testing process by eliminating redundant tests and associated artifacts. --- AzurePipelines/prod-test-build-and-push.yml | 25 ----------- cypress/e2e/a11y/a11y.cy.js | 46 --------------------- package.json | 2 - 3 files changed, 73 deletions(-) delete mode 100644 cypress/e2e/a11y/a11y.cy.js diff --git a/AzurePipelines/prod-test-build-and-push.yml b/AzurePipelines/prod-test-build-and-push.yml index 64bfefd48c..fd8e5ac463 100644 --- a/AzurePipelines/prod-test-build-and-push.yml +++ b/AzurePipelines/prod-test-build-and-push.yml @@ -116,10 +116,6 @@ stages: yarn cypress:run displayName: "Run Cypress Tests" - - script: | - yarn test:a11y - displayName: "Run A11y Tests" - # Stop the container after tests - script: | docker stop app @@ -127,13 +123,6 @@ stages: displayName: "Stop Application Container" condition: always() - - task: PublishPipelineArtifact@1 - displayName: "Store A11y Test Results" - inputs: - targetPath: "cypress/a11y-results" - artifact: "a11y-test-results" - condition: always() - - task: PublishTestResults@2 inputs: testResultsFormat: "JUnit" @@ -149,20 +138,6 @@ stages: reportDirectory: "**/coverage" condition: always() - - task: PublishPipelineArtifact@1 - displayName: "Store Cypress Screenshots" - inputs: - targetPath: "cypress/screenshots" - artifact: "cypress-screenshots" - condition: always() - - - task: PublishPipelineArtifact@1 - displayName: "Store Cypress Videos" - inputs: - targetPath: "cypress/videos" - artifact: "cypress-videos" - condition: always() - # - stage: SecurityTest # displayName: Security Testing # dependsOn: Build diff --git a/cypress/e2e/a11y/a11y.cy.js b/cypress/e2e/a11y/a11y.cy.js deleted file mode 100644 index 7b2d736af0..0000000000 --- a/cypress/e2e/a11y/a11y.cy.js +++ /dev/null @@ -1,46 +0,0 @@ -describe('Accessibility Tests', () => { - beforeEach(() => { - cy.visit('/') - cy.injectAxe() - }) - - it('Splash page should have no accessibility violations', () => { - cy.checkA11y(null, { - includedImpacts: ['critical', 'serious'] - }) - }) - - // Separate error pages from regular pages - const regularPages = [ - '/home', - '/updates', - '/projects' - ] - - // const errorPages = [ - // '/test404', - // '/500', - // '/notsupported', - // '/error' - // ] - - regularPages.forEach(path => { - it(`${path} should have no accessibility violations`, () => { - cy.visit(path) - cy.injectAxe() - cy.checkA11y(null, { - includedImpacts: ['critical', 'serious', 'moderate'] - }) - }) - }) - - // errorPages.forEach(path => { - // it(`${path} should have no accessibility violations`, () => { - // cy.visit(path, { failOnStatusCode: false }) - // cy.injectAxe() - // cy.checkA11y(null, { - // includedImpacts: ['critical', 'serious', 'moderate'] - // }) - // }) - // }) -}) \ No newline at end of file diff --git a/package.json b/package.json index ea3c671f33..66ac79d743 100644 --- a/package.json +++ b/package.json @@ -44,8 +44,6 @@ "build-storybook": "storybook build", "test:ci": "jest --ci --reporter=jest-junit --coverage --coverageReporters=cobertura", "test:unit": "jest --forceExit --detectOpenHandles", - "test:a11y": "cypress run --spec \"cypress/e2e/a11y/**/*.cy.js\"", - "test:a11y:open": "cypress open --config-file=cypress.config.js --e2e \"cypress/e2e/a11y/**/*.cy.js\"", "test:coverage": "jest --coverage --forceExit", "cypress:open": "cypress open --config-file=cypress.config.js", "cypress:run": "cypress run --config-file=cypress.config.js",