Update OrderList.spec.js

pull/3420/head
Tuğçe Küçükoğlu 2022-12-08 17:26:45 +03:00
parent 3d17b07c9e
commit 7aae278a2c
1 changed files with 6 additions and 4 deletions

View File

@ -117,11 +117,13 @@ describe('OrderList.vue', () => {
}); });
it('should select item', async () => { it('should select item', async () => {
expect(wrapper.find('.p-orderlist.p-component').exists()).toBe(true);
await wrapper.vm.onItemClick({}, wrapper.vm.modelValue[0], 0); await wrapper.vm.onItemClick({}, wrapper.vm.modelValue[0], 0);
// expect(wrapper.emitted()['update:selection'][0]).toEqual([[wrapper.vm.modelValue[0]]]);
// await wrapper.setProps({ selection: [wrapper.vm.modelValue[0]] }); expect(wrapper.emitted()['update:selection'][0]).toEqual([[wrapper.vm.modelValue[0]]]);
// expect(wrapper.findAll('li.p-orderlist-item')[0].classes()).toContain('p-highlight');
await wrapper.setProps({ selection: [wrapper.vm.modelValue[0]] });
expect(wrapper.findAll('li.p-orderlist-item')[0].classes()).toContain('p-highlight');
}); });
it('should slot works', () => { it('should slot works', () => {