- fix Drawer.spec.js
parent
75e8ee43d6
commit
42e25c5e76
|
@ -71,21 +71,19 @@ describe('Drawer.vue', () => {
|
||||||
expect(enableDocumentSettingsSpy).toHaveBeenCalled();
|
expect(enableDocumentSettingsSpy).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
||||||
// it('When keydown is triggered , hide method should be triggered', async () => {
|
it('When keydown is triggered , hide method should be triggered', async () => {
|
||||||
// const hideSpy = vi.spyOn(wrapper.vm, 'hide');
|
await wrapper.vm.onKeydown({ code: 'Escape' });
|
||||||
//
|
|
||||||
// await wrapper.vm.onKeydown({ code: 'Escape' });
|
expect(wrapper.emitted()['update:visible'].length).toBe(1);
|
||||||
//
|
});
|
||||||
// expect(hideSpy).toHaveBeenCalled();
|
|
||||||
// });
|
it('When keydown is triggered , hide method should be triggered', async () => {
|
||||||
//
|
const closeBtn = wrapper.find('.p-drawer-close-button');
|
||||||
// it('When keydown is triggered , hide method should be triggered', async () => {
|
|
||||||
// const hideSpy = vi.spyOn(wrapper.vm, 'hide');
|
await closeBtn.trigger('click');
|
||||||
//
|
|
||||||
// await wrapper.find('.p-drawer-close').trigger('click');
|
expect(wrapper.emitted()['update:visible'].length).toBe(1);
|
||||||
//
|
});
|
||||||
// expect(hideSpy).toHaveBeenCalled();
|
|
||||||
// });
|
|
||||||
|
|
||||||
it('When component is unmount , unbindOutsideClickListenerSpy method should be triggered', async () => {
|
it('When component is unmount , unbindOutsideClickListenerSpy method should be triggered', async () => {
|
||||||
const unbindOutsideClickListenerSpy = vi.spyOn(wrapper.vm, 'unbindOutsideClickListener');
|
const unbindOutsideClickListenerSpy = vi.spyOn(wrapper.vm, 'unbindOutsideClickListener');
|
||||||
|
|
Loading…
Reference in New Issue