-
Notifications
You must be signed in to change notification settings - Fork 273
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
chore: deprecate some a11y queries #1226
Conversation
4fae1c7
to
2078fa5
Compare
src/queries/a11yState.ts
Outdated
getByAccessibilityState: getByA11yState, | ||
getAllByAccessibilityState: getAllByA11yState, | ||
queryByAccessibilityState: queryByA11yState, | ||
queryAllByAccessibilityState: queryAllByA11yState, | ||
findByAccessibilityState: findByA11yState, | ||
findAllByAccessibilityState: findAllByA11yState, | ||
}, | ||
'AccessibilityState', | ||
'Role(role, { disabled, selected, checked, busy, expanded }) query or expect(...).toHaveAccessibilityState(...) matcher' | ||
'Use {queryPrefix}ByRole(role, { disabled, selected, checked, busy, expanded }) query or expect(...).toHaveAccessibilityState(...) matcher instead.' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great refactor !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks very good ! Great deprecation warnings and documentation
Codecov ReportBase: 95.98% // Head: 96.04% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1226 +/- ##
==========================================
+ Coverage 95.98% 96.04% +0.06%
==========================================
Files 47 49 +2
Lines 3240 3290 +50
Branches 489 494 +5
==========================================
+ Hits 3110 3160 +50
Misses 130 130
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Summary
Make
*ByA11yState
and*ByA11yValue
queries deprecated, redirecting user to use*ByRole
queries ortoHaveAcessbibilityState/Value()
matchers.When doing any of the mentioned queries, user will received following warning to console:
Resolves #1208
Test plan
Add tests for deprecation messages warnings.