Skip to content

Commit

Permalink
chore: Remove cypress-axe checks (#28614)
Browse files Browse the repository at this point in the history
* Remove cypress-axe checks

* chore: empty commit

* remove calls to injectAxe and checkA11y
  • Loading branch information
jennifer-shehane authored Jan 3, 2024
1 parent b5bd3da commit 204d09a
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 38 deletions.
4 changes: 0 additions & 4 deletions packages/app/cypress/e2e/cypress-in-cypress-e2e.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -236,16 +236,12 @@ describe('Cypress In Cypress E2E', { viewportWidth: 1500, defaultCommandTimeout:
cy.visitApp()
cy.contains('withFailure.spec').click()
cy.get('button[aria-controls="reporter-inline-specs-list"]').click()
cy.injectAxe()
cy.checkA11y('[data-cy="specs-list-panel"]')
})

it('has no axe violations in reporter panel', () => {
cy.visitApp()
cy.contains('withFailure.spec').click()
cy.get('button[aria-controls="reporter-inline-specs-list"]').click()
cy.injectAxe()
cy.checkA11y('[data-cy="reporter-panel"]')
})
})
})
5 changes: 0 additions & 5 deletions packages/app/cypress/e2e/sidebar_navigation.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,6 @@ describe('Sidebar Navigation', { viewportWidth: 1280 }, () => {
.tab().should('have.attr', 'data-cy', 'keyboard-modal-trigger').should('have.prop', 'tagName', 'BUTTON')
})

it('has no axe violations', () => {
cy.injectAxe()
cy.checkA11y('[data-cy="sidebar"]')
})

it('has appropriate aria attributes', () => {
cy.findByTestId('toggle-sidebar')
.should('have.attr', 'aria-controls', 'sidebar')
Expand Down
19 changes: 0 additions & 19 deletions packages/frontend-shared/cypress/support/customPercyCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import '@percy/cypress'
import type { SnapshotOptions } from '@percy/core'
import 'cypress-axe'

export interface CustomSnapshotOptions extends SnapshotOptions{
/**
Expand Down Expand Up @@ -55,22 +54,6 @@ declare global {
}
}

function setupAxeAndCheckA11y () {
if (Cypress.testingType === 'component') {
// skip axe in component tests for the time being,
// it has started to error after the a11y check for some reason
// and needs to be investigated
return
}

cy.injectAxe()

Cypress.log({ displayName: '♿️ Accessibility Check ♿️' })

// passing undefined here so that we can set the final boolean to ignore failures for now
cy.checkA11y(undefined, undefined, undefined, true)
}

class ElementOverrideManager {
private mutationStack: Array<MutationRecord> | undefined = undefined

Expand Down Expand Up @@ -259,8 +242,6 @@ export const installCustomPercyCommand = ({ before, elementOverrides }: {before?
// since Percy snapshots represent visually unique states in the application
// doing an accessibility check here should cover all situations that need to a11y checks

setupAxeAndCheckA11y()

return applySnapshotMutations({
...snapshotMutationOptions,
log: 'skipping Percy: hover to see snapshot',
Expand Down
1 change: 0 additions & 1 deletion packages/frontend-shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"browser-logos": "github:alrra/browser-logos",
"combine-properties": "0.1.0",
"cross-env": "6.0.3",
"cypress-axe": "^1.5.0",
"cypress-plugin-tab": "1.0.5",
"cypress-real-events": "1.6.0",
"dayjs": "^1.9.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,6 @@ describe('<HeaderBarContent />', { viewportWidth: 1000, viewportHeight: 750 }, (
})

afterEach(() => {
// Setting the clock in the beforeEach was causing the cy.checkA11y call in cy.percySnapshot to timeout only in open mode. Resetting
// the clock here prevents that timeout
cy.clock().invoke('restore')
})

Expand Down
3 changes: 1 addition & 2 deletions packages/frontend-shared/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@
"@intlify/unplugin-vue-i18n/messages",
"@testing-library/cypress",
"cypress-real-events",
"cypress",
"cypress-axe"
"cypress"
],
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12064,11 +12064,6 @@ cyclist@^1.0.1:
resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9"
integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk=

cypress-axe@^1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/cypress-axe/-/cypress-axe-1.5.0.tgz#95082734583da77b51ce9b7784e14a442016c7a1"
integrity sha512-Hy/owCjfj+25KMsecvDgo4fC/781ccL+e8p+UUYoadGVM2ogZF9XIKbiM6KI8Y3cEaSreymdD6ZzccbI2bY0lQ==

cypress-each@^1.11.0:
version "1.11.0"
resolved "https://registry.yarnpkg.com/cypress-each/-/cypress-each-1.11.0.tgz#013c9b43a950f157bcf082d4bd0bb424fb370441"
Expand Down

4 comments on commit 204d09a

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 204d09a Jan 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.6.3/linux-x64/develop-204d09ae4a43d19bc7296a2b2a73e3b1a7908873/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 204d09a Jan 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the linux arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.6.3/linux-arm64/develop-204d09ae4a43d19bc7296a2b2a73e3b1a7908873/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 204d09a Jan 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin x64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.6.3/darwin-x64/develop-204d09ae4a43d19bc7296a2b2a73e3b1a7908873/cypress.tgz

@cypress-bot
Copy link
Contributor

@cypress-bot cypress-bot bot commented on 204d09a Jan 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Circle has built the darwin arm64 version of the Test Runner.

Learn more about this pre-release build at https://on.cypress.io/advanced-installation#Install-pre-release-version

Run this command to install the pre-release locally:

npm install https://cdn.cypress.io/beta/npm/13.6.3/darwin-arm64/develop-204d09ae4a43d19bc7296a2b2a73e3b1a7908873/cypress.tgz

Please sign in to comment.