Skip to content

Fix regression "X.matches is not a function" in v3.16.6 #213

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

Merged

Conversation

valscion
Copy link
Contributor

@valscion valscion commented Feb 14, 2019

What:

I fixed the regression caused by #209 and described here: #209 (comment)

After this was merged, I'm getting container.matches is not a function using cypress-testing-library. Any ideas why this could be?

Update: I can confirm it was this change. I edited my package json to force it to resolve dom-testing-library to v3.16.5 (the version prior to this being released) and my tests passed.

My cypress test's use of this library is a mere cy.getByLabelText('User name').type('john') (it's a new project and I'm just starting to write tests to it).

Why:

I want my Cypress tests to pass with the latest dom-testing-library 😄

How:

I first added a failing test case, running in CI, to demonstrate the existence of a regression.

Then the next commit will fix that by testing first that we can use .matches function as described here: #209 (comment)

Checklist:

  • Documentation added to the docs site N/A
  • Typescript definitions updated N/A
  • Tests
  • Ready to be merged
  • Added myself to contributors table

@valscion
Copy link
Contributor Author

valscion commented Feb 14, 2019

Actually #215 seems to highlight yet another issue with this same code branch. I'll see if I can fix that, too

EDIT: If it turns out this doesn't fix #215, we can create another PR. This should fix the regression from #209 at least, so this is ready for review.

EDIT2: Yes, #215 does highlight an issue with this same code branch and I should fix that here, too.

@valscion valscion changed the title Fix regression for Cypress "container.matches is not a function" Fix regression "container.matches is not a function" in v3.16.6 Feb 14, 2019
@valscion valscion changed the title Fix regression "container.matches is not a function" in v3.16.6 Fix regression "X.matches is not a function" in v3.16.6 Feb 14, 2019
@kentcdodds
Copy link
Member

Thanks for working on this @valscion! I'll wait until you give me the 👍 before merging :)

@valscion
Copy link
Contributor Author

valscion commented Feb 14, 2019

I think that I'm too confused on #215 currently that I'd feel better if we'd merge this PR to fix the regression raised in #209 and then if this won't resolve #215, I'll create another PR to tackle that.

So let's merge this as it currently stands, just to get the fix for Cypress out the door at least.

EDIT: Oh wow that sentence totally got out of hand.
EDIT2: I'll clarify:

@kentcdodds
Copy link
Member

Thanks!

@kentcdodds
Copy link
Member

🎉 This PR is included in version 3.16.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.

2 participants