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

chore(form): add more tests around keyboard interactivity in forms #5083

Merged
merged 1 commit into from
Nov 9, 2020

Conversation

seanforyou23
Copy link
Collaborator

What: Steps toward closing #3953

This PR adds more cypress tests to the Forms demo to verify basic keyboard interactions are in place. I did notice that cypress has a hard time working with our Form controls. Things like the cypress tab plugin do not successfully tab around the typeahead multiselect (and forms in general) and using trigger/type functions to press enter were also inconsistent. Despite this, I was able to add some useful tests.

For checkbox, I wanted to verify that pressing the spacebar would check/uncheck the box but support for spacebar seems incomplete in cypress. The functionality does of course work in our components, just that after spending a couple hours trying to get cypress to verify this, I had to call a stopping point. Any help here would be great, otherwise we may be better served to raise an issue in the cypress repo.

@patternfly-build
Copy link
Contributor

patternfly-build commented Oct 30, 2020

Copy link
Contributor

@jessiehuff jessiehuff left a comment

Choose a reason for hiding this comment

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

I agree. I pulled down your code and was trying it myself, and it's so bizarre that the test works the first time checking that it becomes checked but not unchecked. I think this does verify that the keyboard functionality works though, and when submitting an issue to cypress I can see it making sense to keep this test to show where it doesn't work.
LGTM!

Copy link
Contributor

@redallen redallen left a comment

Choose a reason for hiding this comment

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

Cypress' lack of keyboard support is astonishing.

Copy link
Contributor

@tlabaj tlabaj left a comment

Choose a reason for hiding this comment

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

LGTM

@tlabaj tlabaj merged commit 5256b95 into patternfly:master Nov 9, 2020
@patternfly-build
Copy link
Contributor

Your changes have been released in:

Thanks for your contribution! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants