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/toggleSelectOptions #252

Merged
merged 9 commits into from Jun 5, 2020

Conversation

malcolm-kee
Copy link
Collaborator

resolves #180

@codecov
Copy link

codecov bot commented Apr 27, 2020

Codecov Report

Merging #252 into master will increase coverage by 0.05%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #252      +/-   ##
==========================================
+ Coverage   99.20%   99.26%   +0.05%     
==========================================
  Files           2        2              
  Lines         253      273      +20     
  Branches       65       70       +5     
==========================================
+ Hits          251      271      +20     
  Misses          2        2              
Impacted Files Coverage Δ
src/index.js 98.88% <100.00%> (+0.13%) ⬆️

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 4abecfa...6e31338. Read the comment docs.

@kentcdodds
Copy link
Member

Hi @malcolm-kee,

So sorry that you put all of this work into this PR and haven't heard anything in months. I'm starting to pick up development here. Would you be interested in getting this PR updated with the latest version of the code?

If so, there are two bits of feedback:

  1. I'd prefer to call this toggleSelectOption to make it more clear that it's for selects
  2. Could you update the tests to use the new setup utility?

Here's an example usage:

test('{esc} triggers typing the escape character', async () => {
const {element: input, getEventCalls} = setup(<input />)
await userEvent.type(input, '{esc}')
expect(getEventCalls()).toMatchInlineSnapshot(`
focus
keydown: Escape (27)
keyup: Escape (27)
`)
})

Again, I apologize for the trouble.

@malcolm-kee
Copy link
Collaborator Author

@kentcdodds no problem at all. I'll add the changes.

@malcolm-kee malcolm-kee changed the title Feat/toggle option Feat/toggleSelectOptions Jun 5, 2020
Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is solid! Just a few suggestions/ideas.

README.md Outdated Show resolved Hide resolved
src/__tests__/toggleselectoptions.js Outdated Show resolved Hide resolved
src/__tests__/toggleselectoptions.js Show resolved Hide resolved
src/__tests__/toggleselectoptions.js Outdated Show resolved Hide resolved
Copy link
Member

@kentcdodds kentcdodds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super! Thank you!

@kentcdodds kentcdodds merged commit 8797ea1 into testing-library:master Jun 5, 2020
@kentcdodds
Copy link
Member

@all-contributors please add @malcolm-kee for code, docs, and tests

@allcontributors
Copy link
Contributor

@kentcdodds

I've put up a pull request to add @malcolm-kee! 🎉

@malcolm-kee malcolm-kee deleted the feat/toggle-option branch June 5, 2020 13:26
@kentcdodds
Copy link
Member

Thanks so much for your help! I've added you as a collaborator on the project. Please make sure that you review the other/MAINTAINING.md and CONTRIBUTING.md files (specifically the bit about the commit messages and the git hooks) and familiarize yourself with the code of conduct (we're using the contributor covenant). You might also want to watch the repo to be notified when someone files an issue/PR. Please continue to make PRs as you feel the need (you can make your branches directly on the repo rather than your fork if you want). Thanks! And welcome to the team :)

@malcolm-kee
Copy link
Collaborator Author

Thanks @kentcdodds !

@kentcdodds
Copy link
Member

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

Support for unselect options?
2 participants