From 7aae278a2c43421cca95dd97904ef93a8c98f292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Thu, 8 Dec 2022 17:26:45 +0300 Subject: [PATCH] Update OrderList.spec.js --- components/orderlist/OrderList.spec.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/components/orderlist/OrderList.spec.js b/components/orderlist/OrderList.spec.js index 8aec684c0..39156a8ee 100644 --- a/components/orderlist/OrderList.spec.js +++ b/components/orderlist/OrderList.spec.js @@ -117,11 +117,13 @@ describe('OrderList.vue', () => { }); it('should select item', async () => { - expect(wrapper.find('.p-orderlist.p-component').exists()).toBe(true); 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.findAll('li.p-orderlist-item')[0].classes()).toContain('p-highlight'); + + expect(wrapper.emitted()['update:selection'][0]).toEqual([[wrapper.vm.modelValue[0]]]); + + await wrapper.setProps({ selection: [wrapper.vm.modelValue[0]] }); + + expect(wrapper.findAll('li.p-orderlist-item')[0].classes()).toContain('p-highlight'); }); it('should slot works', () => {