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

Enabling toBeDisabled matcher for TextInput elements #15

Merged
merged 3 commits into from
Nov 29, 2019

Conversation

acatalina
Copy link
Contributor

@acatalina acatalina commented Nov 29, 2019

What:
Enabling toBeDisabled matcher for TextInput elements

Why:
They were ignored before

How:
Just added TextInput as a valid disabled element

Checklist:

  • Documentation added to the
    docs
  • Typescript definitions updated
  • Tests
  • Ready to be merged

Hi! Thanks for this library first of all :)

So I have added some tests but I am having a weird problem with them. It looks like the element is passing as null for some reason. I've tried to update react native and testing library but the issue carries on happening. Wondering if you could help with this little bit and have the PR ready?

Thanks again

@bcarroll22
Copy link
Collaborator

Hi there, thanks for the PR! The issue in the new tests is that you're looking for the TextInput via queryByText. That won't work. If you look for them via queryByDisplayValue, the tests will pass.

Thanks again! We'll get this merged once the PR is updated 👍

@acatalina
Copy link
Contributor Author

queryByDisplayValue

Oh, nice one, thanks! I've changed the accessibilityStates for editable that feels less imperative? Let me know what you think

@codecov
Copy link

codecov bot commented Nov 29, 2019

Codecov Report

Merging #15 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #15   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           8      8           
  Lines          90     90           
  Branches       23     23           
=====================================
  Hits           90     90
Impacted Files Coverage Δ
src/to-be-disabled.js 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 24f36d0...026a6ae. Read the comment docs.

Copy link
Collaborator

@bcarroll22 bcarroll22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this works for me. Thanks!

@bcarroll22
Copy link
Collaborator

@allcontributors please add @acatalina for code

@allcontributors
Copy link
Contributor

@bcarroll22

I've put up a pull request to add @acatalina! 🎉

@bcarroll22 bcarroll22 merged commit 77ca440 into testing-library:master Nov 29, 2019
bcarroll22 pushed a commit that referenced this pull request Nov 29, 2019
* add textInput for disabled support

* add textInputs tests

* fix tests
bcarroll22 added a commit that referenced this pull request Nov 29, 2019
…) (#17)

* add textInput for disabled support

* add textInputs tests

* fix tests
@bcarroll22
Copy link
Collaborator

🎉 This PR is included in version 3.1.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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants