politico/vue-accessible-selects
Specs: add spec for "when I press enter, the component behaves as expected"
Open
#73 opened on Jan 29, 2021
good first issuetests
Repository metrics
- Stars
- (12 stars)
- PR merge metrics
- (PR metrics pending)
Description
Per this comment: https://github.com/politico/vue-accessible-selects/pull/71#discussion_r566815626
There are a couple things we'll want to test. Right now, SelectMulti.spec.ts only checks for behavior when clicking options. Let's add some initial specs for pressing enter, and lets add them to both SelectMulti.spec.ts and SelectSingle.spec.ts. Things like:
- When I press enter on an option, it's selected.
- When I press enter on an option, it emits the correct event(s)
- (multi) When I press enter on a selected option, it's unselected
- (multi) When I press enter not on an option, no event is emitted/nothing happens
- (multi) When I press enter while on a selected pill, it's unselected