Chip & Inplace test fixes

pull/3892/head
Tuğçe Küçükoğlu 2023-04-19 17:20:55 +03:00
parent 8a49bcdc8a
commit 738811ee0a
2 changed files with 4 additions and 3 deletions

View File

@ -34,7 +34,7 @@ describe('Chip.vue', () => {
it('When removable is true and keydown triggered OnKeydown method should be called', async () => {
const closeSpy = vi.spyOn(wrapper.vm, 'onKeydown');
await wrapper.find('.p-chip-remove-icon').trigger('keydown');
wrapper.vm.onKeydown({ key: 'Enter' });
expect(closeSpy).toHaveBeenCalled();
});

View File

@ -70,11 +70,12 @@ describe('Inplace.vue', () => {
await wrapper.vm.open({});
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({});
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 () => {