chore(form): add more tests around keyboard interactivity in forms #5083
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.