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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

Projects
None yet
2 participants
@valscion
Copy link
Contributor

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 added some commits Feb 14, 2019

@valscion

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Member

commented Feb 14, 2019

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

@valscion

This comment has been minimized.

Copy link
Contributor Author

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:

  • I'm confused on #215 鈥 this PR might resolve that issue
  • I'm sure this PR resolves the regression raised in #209 (comment)
  • When I understand #215, I can try fixing that in another PR
  • This PR is mergeable right now.

@kentcdodds kentcdodds merged commit 2cda6a7 into testing-library:master Feb 14, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@kentcdodds

This comment has been minimized.

Copy link
Member

commented Feb 14, 2019

Thanks!

@kentcdodds

This comment has been minimized.

Copy link
Member

commented Feb 14, 2019

馃帀 This PR is included in version 3.16.7 馃帀

The release is available on:

Your semantic-release bot 馃摝馃殌

@kentcdodds kentcdodds added the released label Feb 14, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.