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

feat: support RN 0.62 accessibilityState in toBeDisabled #30

Merged
merged 1 commit into from
Jul 29, 2020
Merged

feat: support RN 0.62 accessibilityState in toBeDisabled #30

merged 1 commit into from
Jul 29, 2020

Conversation

brunohkbx
Copy link
Collaborator

What:
This PR adds support to the prop accessibilityState to the matcher toBeDisabled

Why:
RN 0.62 removed the old prop accessibilityStates in favor of accessibilityState
https://reactnative.dev/blog/2020/03/26/version-0.62#breaking-changes

How:
I created a new condition hasStateDisabled to verify whether the prop accessibilityState has disabled in its value to be used together with the old condition for accessibilityStates. Maybe in the future, we can deprecate and remove this.

Checklist:

  • Documentation added to the docs
  • [N/A] Typescript definitions updated
  • Tests
  • Ready to be merged

@codecov
Copy link

codecov bot commented Jul 7, 2020

Codecov Report

Merging #30 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master       #30   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            8         8           
  Lines           90        92    +2     
  Branches        24        24           
=========================================
+ Hits            90        92    +2     
Impacted Files Coverage Δ
src/to-be-disabled.js 100.00% <100.00%> (ø)

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 db5ccb3...f0a0b46. Read the comment docs.

src/__tests__/to-be-disabled.js Outdated Show resolved Hide resolved
src/__tests__/to-be-disabled.js Outdated Show resolved Hide resolved
src/__tests__/to-be-disabled.js Outdated Show resolved Hide resolved
src/__tests__/to-be-disabled.js Outdated Show resolved Hide resolved
src/__tests__/to-be-disabled.js Outdated Show resolved Hide resolved
src/__tests__/to-be-disabled.js Outdated Show resolved Hide resolved
src/__tests__/to-be-disabled.js Outdated Show resolved Hide resolved
src/__tests__/to-be-disabled.js Outdated Show resolved Hide resolved
src/__tests__/to-be-disabled.js Outdated Show resolved Hide resolved
src/to-be-disabled.js Outdated Show resolved Hide resolved
@brunohkbx brunohkbx merged commit 7667e16 into testing-library:master Jul 29, 2020
@brunohkbx brunohkbx deleted the feat/support-accessibility-state branch July 29, 2020 18:23
@bcarroll22
Copy link
Collaborator

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

3 participants