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

Update @testing-library/dom version #174

Conversation

dasblitz
Copy link
Contributor

@dasblitz dasblitz commented Mar 1, 2021

What:

Bumps the @testing-library/dom version to ^7.29.6

Why:

Currently when using the expanded option in cy.findByRole Typescript complains that expanded is not defined in the ByRoleOptions type.

Example:

cy.findByRole("button", {
  name: /button-label/i,
  expanded: true, // the expanded prop is not allowed by typescript
})

This is because the @testing-library/dom v7.28.1 that's being referenced in package.json doesn't have the expanded property defined in queries.d.ts

How:

I've updated the @testing-library/dom version in package.json

Checklist:

  • Documentation N/A
  • Tests
  • Ready to be merged

The version of @testing-library/dom went from 7.28.1 -> 7.29.6, the most significant change between those versions was adding types I think.

I'd like to try it out in one of my own projects that use cypress-testing-library first, but I'm not really sure how to build this package locally. Some help on that would be appreciated. Or if you don't expect any issues from this, then of course it can be merged.

@NicholasBoll NicholasBoll linked an issue Jun 2, 2021 that may be closed by this pull request
@NicholasBoll NicholasBoll merged commit d1c9ee9 into testing-library:main Jun 2, 2021
@github-actions
Copy link

🎉 This PR is included in version 7.0.7 🎉

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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Typescript ByRoleOptions type is missing expanded property
2 participants