Fixed #5095 - Unit tests in the master branch are failing

This commit is contained in:
tugcekucukoglu 2024-01-18 11:14:47 +03:00
parent a40796714c
commit 48aa388953
7 changed files with 22 additions and 68 deletions

View file

@ -8,13 +8,13 @@ describe('InputSwitch.vue', () => {
expect(wrapper.find('.p-inputswitch.p-component').exists()).toBe(true);
expect(wrapper.find('.p-inputswitch-slider').exists()).toBe(true);
await wrapper.trigger('click');
await wrapper.vm.onChange({});
expect(wrapper.emitted()['update:modelValue'][0]).toEqual([true]);
await wrapper.setProps({ modelValue: true });
expect(wrapper.vm.checked).toBe(true);
expect(wrapper.find('.p-inputswitch').classes()).toContain('p-inputswitch-checked');
expect(wrapper.find('.p-inputswitch').classes()).toContain('p-highlight');
});
});