jest-native icon indicating copy to clipboard operation
jest-native copied to clipboard

feat: support @testing-library/react-native 7.0

Open brunohkbx opened this issue 4 years ago • 6 comments

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

brunohkbx avatar Nov 12 '20 15:11 brunohkbx

Codecov Report

Merging #50 (f63a819) into master (3cfd279) will decrease coverage by 3.65%. The diff coverage is 100.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 Impacted file tree graph

@@             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 data Powered by Codecov. Last update 3cfd279...1f1bda8. Read the comment docs.

codecov[bot] avatar Nov 12 '20 17:11 codecov[bot]

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 avatar Nov 12 '20 17:11 thymikee

@thymikee sorry for taking too long to answer. I thought exactly the same. I'll try to reimplement toBeDisabled in this PR

brunohkbx avatar Nov 17 '20 20:11 brunohkbx

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.

deriegle avatar Dec 18 '20 21:12 deriegle

@thymikee @mdjastrzebski after some months I'm finally back to this PR. sorry for that.

I have some questions:

  1. Do you guys think this PR should be a breaking change? Or is it fine to release in the current 4.0?
  2. 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 check pointerEvents and accessibilityState?

brunohkbx avatar Apr 06 '21 19:04 brunohkbx

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?

mdjastrzebski avatar Sep 30 '22 12:09 mdjastrzebski

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.

mdjastrzebski avatar Nov 04 '22 08:11 mdjastrzebski