2
0
mirror of https://github.com/tenrok/vue2-datepicker.git synced 2026-06-23 09:50:35 +03:00

fix: panel doesn't close after picking time (#378)

This commit is contained in:
mengxiong10
2019-11-22 17:57:56 +08:00
parent bf949afc7d
commit 8657d49324
2 changed files with 20 additions and 1 deletions
+18
View File
@@ -300,4 +300,22 @@ describe('DatePicker', () => {
const emitted = wrapper.emitted();
expect(emitted.input[0][0]).toEqual([null, null]);
});
it('feat: should close popup when click time in datetime mode', () => {
wrapper = mount(DatePicker, {
propsData: {
type: 'datetime',
timePickerOptions: {
start: '00:00',
step: '00:30',
end: '23:30',
},
open: true,
showTimePanel: true,
},
});
const el = wrapper.find('.mx-time-option');
el.trigger('click');
expect(wrapper.emitted().close).toBeTruthy();
});
});