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

feat(react): added tabbing and other interactions into cypress tests … #1685

Merged

Conversation

gd2910
Copy link
Contributor

@gd2910 gd2910 commented Mar 21, 2024

…suite

Summary of the changes

Previously cypress did not support tabbing(keyboard), adding cypress-real-events allows us to test the components in a more comprehensive manner in which our users would interact with them

Related issue

#1538

Checklist

General

  • Changes to docs package checked and committed.
  • All acceptance criteria reviewed and met.

Testing

  • Relevant unit tests and visual regression tests added.
  • Visual testing against Figma component specification completed.

Accessibility

  • Accessibility Insights FastPass performed.
  • A11y unit test added and yields no issues.
  • A11y plug-in on Storybook yields no issues.
  • Manual screen reader testing performed using NVDA and VoiceOver.
  • Manual keyboard testing for keyboard controls and logical focus order.
  • Correct roles used and ARIA attributes used correctly where required.
  • Logical heading structure is maintained, and the HTML elements used for headings can be changed to fit within the wider page structure.

Resize/zoom behaviour

  • Page can be zoomed to 400% with no loss of content.
  • Screen magnifier used with no issues.
  • Text resized to 200% with no loss of content.
  • Text spacing increased as per the WCAG 1.4.12 success criterion with no loss of content.

System modes

  • Browser setting 'prefers reduced motion' tested. No animations or motion visible whilst this setting is on.
  • Windows High Contrast mode tested with no loss of content.
  • System light and dark mode tested with no loss of content.
  • Browser support tested (Chrome, Safari, Firefox and Edge).

Testing content extremes

  • Min/max content examples tested with no loss of content or overflow.
  • All prop combinations work without issue.
  • Tested for FOUC (Flash of Unstyled Content) in both SSR (Server-Side Rendering) and SSG (Static Site Generation) settings.

@gd2910 gd2910 force-pushed the 1538-keyboard-interaction-in-cypress-testing branch 2 times, most recently from 9d211ee to f1ac73e Compare March 21, 2024 13:00
ad9242
ad9242 previously requested changes Mar 21, 2024
Copy link
Contributor

Choose a reason for hiding this comment

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

how come the quotes have changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

My editor was set to use the prettier.json settings in packages/web-components, which has singleQuotes set to true, prettier:fix doesn't cover this file so it was never being fixed. Sorted now.

packages/react/package-lock.json Outdated Show resolved Hide resolved
@gd2910 gd2910 force-pushed the 1538-keyboard-interaction-in-cypress-testing branch 4 times, most recently from bea1587 to f6e76b5 Compare March 22, 2024 13:09
…suite

Previously cypress did not support tabbing(keyboard), adding cypress-real-events allows us to test
the components in a more comprehensive manner in which our users would interact with them
@gd2910 gd2910 force-pushed the 1538-keyboard-interaction-in-cypress-testing branch from f6e76b5 to 06d4a51 Compare March 22, 2024 13:10
@GCHQ-Developer-299 GCHQ-Developer-299 dismissed ad9242’s stale review March 22, 2024 13:18

Reviewer is out of office, comments have been addressed

@GCHQ-Developer-847 GCHQ-Developer-847 merged commit 8fe1ddf into develop Mar 22, 2024
6 checks passed
@GCHQ-Developer-847 GCHQ-Developer-847 deleted the 1538-keyboard-interaction-in-cypress-testing branch March 22, 2024 14:56
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

4 participants