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

getByDisplayValue is missing in TypeScript types #42

Closed
theforce1989 opened this issue May 23, 2019 · 3 comments · Fixed by #51
Closed

getByDisplayValue is missing in TypeScript types #42

theforce1989 opened this issue May 23, 2019 · 3 comments · Fixed by #51
Labels

Comments

@theforce1989
Copy link

  • cypress-testing-library version: 3.0.1
  • node version: 11.10.0
  • yarn version: 1.14.0

Relevant code or config

cy.getByDisplayValue("something");

What you did:
updated to cypress-testing-library 3.0.1 and because of breaking changes in dom-testing-library as outlined in the release notes, I switched my getByValue queries to getByDisplayValue.

What happened:
TS compile fails because getByDisplayValue is not defined in cypress-testing-library/typings

Suggested solution:
update typings to reflect the changes in the API

@kentcdodds
Copy link
Member

Thanks for the issue. Could you make a pull request to add them?

@ppi-buck
Copy link
Collaborator

ppi-buck commented Jun 5, 2019

The PR should also include updated tests inside https://github.com/testing-library/cypress-testing-library/blob/master/cypress/integration/commands.spec.js and https://github.com/testing-library/cypress-testing-library/blob/master/tests/typescript-types/test.spec.ts if possible.

Because these tests are missing the *ByValue or *ByDisplayValue all together the issue didn't occur automatically earlier.

PS: For now the PR only contains the fixes but I might get back to adjusting the tests and creating another PR for those. Not enough time right now

kentcdodds pushed a commit that referenced this issue Jun 5, 2019
These changes in typings were not done when changing the API from *ByValue to *ByDisplayValue 

Closes #42
@kentcdodds
Copy link
Member

🎉 This issue has been resolved in version 4.0.3 🎉

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 a pull request may close this issue.

3 participants