mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 17:02:38 +00:00
Styles imported. Components added
This commit is contained in:
parent
3cb3910561
commit
8264983db4
452 changed files with 55902 additions and 0 deletions
20
components/inputswitch/InputSwitch.spec.js
Normal file
20
components/inputswitch/InputSwitch.spec.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
import { mount } from '@vue/test-utils';
|
||||
import InputSwitch from './InputSwitch.vue';
|
||||
|
||||
describe('InputSwitch.vue', () => {
|
||||
it('should exist', async () => {
|
||||
const wrapper = mount(InputSwitch);
|
||||
|
||||
expect(wrapper.find('.p-inputswitch.p-component').exists()).toBe(true);
|
||||
expect(wrapper.find('.p-inputswitch-slider').exists()).toBe(true);
|
||||
|
||||
await wrapper.trigger('click');
|
||||
|
||||
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');
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue