jest-native
jest-native copied to clipboard
feat: support @testing-library/react-native 7.0
Rewrite toBeDisabled asserting the logic RN does around onStartShouldSetResponder as discussed in #23
- [x] Documentation added to the docs
- [x] Typescript definitions updated
- [x] Tests
- [x] Ready to be merged
Resolves #43
Codecov Report
Merging #50 (f63a819) into master (3cfd279) will decrease coverage by
3.65%. The diff coverage is100.00%.
:exclamation: Current head f63a819 differs from pull request most recent head 1f1bda8. Consider uploading reports for the commit 1f1bda8 to get more accurate results
@@ Coverage Diff @@
## master #50 +/- ##
===========================================
- Coverage 100.00% 96.34% -3.66%
===========================================
Files 8 8
Lines 96 82 -14
Branches 28 26 -2
===========================================
- Hits 96 79 -17
- Misses 0 1 +1
- Partials 0 2 +2
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/to-be-disabled.js | 60.00% <100.00%> (-40.00%) |
:arrow_down: |
| src/utils.js | 93.75% <0.00%> (-6.25%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 3cfd279...1f1bda8. Read the comment docs.
Um, I don't see why would we remove the feature to add it once again? Maybe we could extract some helpers from RNTL that could be used by toBeDisabled? I'm in favor of removing toBeEnabled though, as it should be inverse of disabled.
@thymikee sorry for taking too long to answer.
I thought exactly the same. I'll try to reimplement toBeDisabled in this PR
I'll try to reimplement toBeDisabled in this PR
Is there still work being done on this? We'd really like to be able to use toBeDisabled in our codebase again, but it doesn't work as expected after upgrading to v7 of RNTL.
@thymikee @mdjastrzebski after some months I'm finally back to this PR. sorry for that.
I have some questions:
- Do you guys think this PR should be a breaking change? Or is it fine to release in the current 4.0?
- Looks like RNTL master branch is quite different than this PR #460 from @mdjastrzebski. Should we still rely only on
onStartShouldSetResponder? Or we could also checkpointerEventsandaccessibilityState?
This PR is out of sync with main branch.
@brunohkbx would you have time and will to re-examine the PR and rebase/reimplement the relevant parts with the current codebase?
Closing as stale. Things have move a lot since this PR has been create. @brunohkbx We might restart this effort in a fresh PR, based on current codebase, if you still see value in it.