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: add switch role to toBeChecked #228

Merged
merged 1 commit into from Apr 8, 2020
Merged

feat: add switch role to toBeChecked #228

merged 1 commit into from Apr 8, 2020

Conversation

jonrimmer
Copy link
Contributor

What:

Add support for the ARIA switch role to the toBeChecked matcher.

Why:

The switch role works the same as the checkbox role, with the switch's status exposed via aria-checked, but toBeChecked() cannot be used with a switch because only the checkbox and radio roles are currently implemented.

How:

Added 'switch' to the list of allowed roles in to-be-checked.js

Checklist:

  • Documentation
  • Tests
  • Updated Type Definitions — N/A (No type definitions in this project.)
  • Ready to be merged

@codecov
Copy link

codecov bot commented Apr 8, 2020

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #228   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           19        19           
  Lines          257       257           
  Branches        62        62           
=========================================
  Hits           257       257           
Impacted Files Coverage Δ
src/to-be-checked.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 69681df...8096242. Read the comment docs.

@gnapse
Copy link
Member

gnapse commented Apr 8, 2020

Thanks!

@gnapse gnapse merged commit 144c647 into testing-library:master Apr 8, 2020
@gnapse
Copy link
Member

gnapse commented Apr 8, 2020

@all-contributors add @jonrimmer for code, test

@allcontributors
Copy link
Contributor

@gnapse

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

@gnapse
Copy link
Member

gnapse commented Apr 8, 2020

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