2022-09-06 12:03:37 +00:00
|
|
|
import { mount } from '@vue/test-utils';
|
|
|
|
import Checkbox from './Checkbox.vue';
|
|
|
|
|
|
|
|
describe('Checkbox.vue', () => {
|
|
|
|
let wrapper;
|
|
|
|
|
|
|
|
beforeEach(() => {
|
|
|
|
wrapper = mount(Checkbox, {
|
|
|
|
props: {
|
|
|
|
modelValue: false,
|
|
|
|
binary: true
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should exist', () => {
|
|
|
|
expect(wrapper.find('.p-checkbox.p-component').exists()).toBe(true);
|
|
|
|
expect(wrapper.find('.p-checkbox-icon.pi.pi-check').exists()).toBe(false);
|
|
|
|
});
|
|
|
|
|
|
|
|
it('should exist', async () => {
|
|
|
|
await wrapper.setProps({ modelValue: true });
|
|
|
|
|
2024-01-18 08:14:47 +00:00
|
|
|
expect(wrapper.find('.p-checkbox.p-highlight').exists()).toBe(true);
|
2022-09-06 12:03:37 +00:00
|
|
|
});
|
2022-09-14 11:26:01 +00:00
|
|
|
});
|