Skip to content

Commit 72a829f

Browse files
authored
Merge pull request react-dates#1912 from airbnb/update-tests-for-keyboard-shortcuts-fix
Adding test for react-dates#1911
2 parents 8484dc6 + 783d756 commit 72a829f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/components/DayPickerKeyboardShortcuts_spec.jsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,14 @@ describe('DayPickerKeyboardShortcuts', () => {
145145
const wrapper = shallow(<DayPickerKeyboardShortcuts {...props} />).dive();
146146
expect(wrapper.children().find(Button)).to.have.lengthOf(1);
147147
});
148+
149+
it('renders the default button if renderKeyboardShortcutsButton is not provided', () => {
150+
const wrapper = shallow(<DayPickerKeyboardShortcuts />).dive();
151+
expect(wrapper.children().find('button')).to.have.lengthOf(1);
152+
expect(wrapper.children().find('button').prop('aria-label')).to.eql(
153+
DayPickerKeyboardShortcutsPhrases.showKeyboardShortcutsPanel,
154+
);
155+
});
148156
});
149157

150158
describe('renderKeyboardShortcutsPanel', () => {

0 commit comments

Comments
 (0)