Update MultiSelect.spec.js

pull/5131/head
tugcekucukoglu 2024-01-23 13:04:03 +03:00
parent 088d3409de
commit 32fe57be3a
1 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ describe('MultiSelect.vue', () => {
await wrapper.setProps({ modelValue: [wrapper.vm.options[0]] }); await wrapper.setProps({ modelValue: [wrapper.vm.options[0]] });
await wrapper.vm.onContainerClick(); await wrapper.vm.onContainerClick();
expect(wrapper.findAll('li.p-multiselect-item')[0].classes()).toContain('p-highlight'); expect(wrapper.findAll('li.p-multiselect-item')[0].attributes()['data-p-highlight']).toBe('true');
expect(wrapper.find('.p-multiselect-label').text()).toBe('New York'); expect(wrapper.find('.p-multiselect-label').text()).toBe('New York');
}); });
@ -62,8 +62,8 @@ describe('MultiSelect.vue', () => {
await wrapper.setProps({ modelValue: [wrapper.vm.options[0], wrapper.vm.options[1]] }); await wrapper.setProps({ modelValue: [wrapper.vm.options[0], wrapper.vm.options[1]] });
await wrapper.vm.onContainerClick(); await wrapper.vm.onContainerClick();
expect(wrapper.findAll('li.p-multiselect-item')[0].classes()).toContain('p-highlight'); expect(wrapper.findAll('li.p-multiselect-item')[0].attributes()['data-p-highlight']).toBe('true');
expect(wrapper.findAll('li.p-multiselect-item')[1].classes()).toContain('p-highlight'); expect(wrapper.findAll('li.p-multiselect-item')[1].attributes()['data-p-highlight']).toBe('true');
}); });
it('should close panel', async () => { it('should close panel', async () => {