Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cypress and cypress-axe packages for accessibility testing (#7201) #7213

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

heybran
Copy link
Contributor

@heybran heybran commented Nov 3, 2023

Description

Add cypress and cypress-axe packages to do automatic accessibility testing.

Related GitHub issue(s)

#7201

Testing instructions

  1. Run npm run cypress:open
  2. Cypress will be open for us to run cypress tests

Screenshots / screencast

Changelog text for these changes

Enhancement: Pods now has cypress installed to do automatic accessibility testing. #7201 (@heybran)

PR checklist

Copy link

what-the-diff bot commented Nov 3, 2023

PR Summary

  • Configured Cypress Setup
    An additional file, cypress.config.js, has been established to provide custom configurations for setting up Cypress.

  • Provided Setup Instructions
    A README.md file was added to give guidance on how to arrange a cypress.env.json file.

  • Cypress Testing for Edit Pod Screen
    Five separate Cypress tests were developed to ensure the functionality and accessibility of the edit pod screen. They check the addition of a field, the creation of a new group, and verify there are no accessibility violations.

  • Cypress Testing for Manage Pods Screen
    A new Cypress test, cypress/e2e/manage-pods-screen/manage-pods-screen.cy.js, was composed to test for accessibility violations on the manage pods screen.

  • Accessibility Reports
    Cypress accessibility reports are documented and compiled in a new file, cypress/e2e/reports.md.

  • Sample Data
    A fixture file, cypress/fixtures/example.json, has been added which encompasses sample data for testing purposes.

  • Custom Login Command
    A new commands file cypress/support/commands.js has been created that hosts a custom login command for Cypress.

  • Setting Up for Accessibility Tests
    We've uploaded a new support file, cypress/support/e2e.js. It imports the commands.js file and sets up cypress-axe to conduct accessibility exams.

  • Updated package.json
    Introduced new scripts cypress:open in package.json to enable opening of the Cypress test runner.

Copy link
Member

Choose a reason for hiding this comment

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

Can we move the /cypress/ directory into /tests/cypress/?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've tried, but can't make it work as cypress has specific rules. I can close this PR and keep the cypress on my local repo since I don't think anyone else other than me will be needing cypress.

@sc0ttkclark
Copy link
Member

Is there a corresponding GitHub action we should be using here?

@sc0ttkclark sc0ttkclark added this to the Backlog milestone Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants