Chip & Inplace test fixes
parent
8a49bcdc8a
commit
738811ee0a
|
@ -34,7 +34,7 @@ describe('Chip.vue', () => {
|
||||||
it('When removable is true and keydown triggered OnKeydown method should be called', async () => {
|
it('When removable is true and keydown triggered OnKeydown method should be called', async () => {
|
||||||
const closeSpy = vi.spyOn(wrapper.vm, 'onKeydown');
|
const closeSpy = vi.spyOn(wrapper.vm, 'onKeydown');
|
||||||
|
|
||||||
await wrapper.find('.p-chip-remove-icon').trigger('keydown');
|
wrapper.vm.onKeydown({ key: 'Enter' });
|
||||||
|
|
||||||
expect(closeSpy).toHaveBeenCalled();
|
expect(closeSpy).toHaveBeenCalled();
|
||||||
});
|
});
|
||||||
|
|
|
@ -70,11 +70,12 @@ describe('Inplace.vue', () => {
|
||||||
await wrapper.vm.open({});
|
await wrapper.vm.open({});
|
||||||
|
|
||||||
expect(wrapper.find('.p-inputtext').exists()).toBe(true);
|
expect(wrapper.find('.p-inputtext').exists()).toBe(true);
|
||||||
expect(wrapper.find('.pi.pi-times').exists()).toBe(true);
|
expect(wrapper.find('.p-inplace-content').exists()).toBe(true);
|
||||||
|
|
||||||
await wrapper.vm.close({});
|
await wrapper.vm.close({});
|
||||||
|
|
||||||
expect(wrapper.find('.pi.pi-times').exists()).toBe(false);
|
expect(wrapper.find('.p-inplace-display').exists()).toBe(true);
|
||||||
|
expect(wrapper.find('.p-inplace-content').exists()).toBe(false);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should have custom close icon', async () => {
|
it('should have custom close icon', async () => {
|
||||||
|
|
Loading…
Reference in New Issue