-
Notifications
You must be signed in to change notification settings - Fork 404
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
Update @types/testing-library__jest-dom dependency #484
Labels
Comments
robinmetral
pushed a commit
to sumup-oss/circuit-ui
that referenced
this issue
Oct 17, 2022
kodiakhq bot
pushed a commit
to sumup-oss/circuit-ui
that referenced
this issue
Oct 19, 2022
…#1795) * Format some component prop descriptions * Remove live region from ImageInput FieldValidationHint A live region only makes sense when the validationHint is an error, not a description. Further research and design are required to improve the field-level validation pattern. Removing the live region and will reintroduce in the future when consistent with other form components. * Move validationHint in aria-describedby in Input, Select and RadioButtonGroup * Fix TextArea UI bug * Add changeset * Update snapshots * Reintroduce ImageInput live region * Connect validationHint to cherckbox using aria-describedby * Add live regions to validation hints when they are status messages * Update snapshots * Fix changeset again Co-authored-by: Connor Bär <connor-baer@users.noreply.github.com> * Install jest-dom types to get definitions for latest matchers See testing-library/jest-dom#484 * Add explicit role to live region This makes it compatible with RTL (we can use getByRole('status') and is generally more explicit and perhaps more compatible (not tested) * Add accessibility tests to Checkbox component * Add accessibility tests to the ImageInput component * Update test utils and improve test grouping in Input, RadioButtonGroup and Select specs * Add accessibility tests to the Input spec * Add accessibility tests to the Select spec * Add accessibility tests to the RadioButtonGroup spec * Add patch changesets * Rephrase changeset Co-authored-by: Connor Bär <connor-baer@users.noreply.github.com> Co-authored-by: Connor Bär <connor-baer@users.noreply.github.com>
4 tasks
🎉 This issue has been resolved in version 6.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@testing-library/jest-dom
version: ^5.16.5node
version: 16npm
(oryarn
) version: yarn 2 latestRelevant code or config:
An example of when this is an issue: (see below for the root cause)
What you did:
I'm asserting that components must have accessible names/descriptions.
What happened:
There's a TypeScript error warning that
toHaveAccessibleName
does not exist in the Jest global matchers.Reproduction:
I don't think it's necessary in this case. Let me know if you'd like it.
Problem description:
The issue is with the
@types
dependency that@testing-library/jest-dom
includes:jest-dom/package.json
Line 35 in 948d90f
This is an outdated version (the latest is 5.14.5 from 4 months ago) which doesn't yet declare matchers such as
toHaveAccessibleName
.Suggested solution:
@testing-library/jest-dom
. I've seen this suggested in several issues, but haven't dug into what the blockers would be. But including types as part of this package would prevent this kind of issues from happening in the future@types/testing-library__jest-dom
in your project)The text was updated successfully, but these errors were encountered: