mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-10 01:12:37 +00:00
Styles imported. Components added
This commit is contained in:
parent
3cb3910561
commit
8264983db4
452 changed files with 55902 additions and 0 deletions
29
components/chip/Chip.spec.js
Normal file
29
components/chip/Chip.spec.js
Normal file
|
@ -0,0 +1,29 @@
|
|||
import { mount } from '@vue/test-utils';
|
||||
import Chip from './Chip.vue';
|
||||
|
||||
describe('Chip.vue', () => {
|
||||
let wrapper;
|
||||
|
||||
beforeEach(() => {
|
||||
wrapper = mount(Chip, {
|
||||
props: {
|
||||
label: 'PrimeVue',
|
||||
icon: 'pi pi-primevue',
|
||||
removable: true
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it('should exists', () => {
|
||||
expect(wrapper.find('.p-chip.p-component').exists()).toBe(true);
|
||||
expect(wrapper.find('.p-chip-icon').classes()).toContain('pi-primevue');
|
||||
expect(wrapper.find('.p-chip-text').text()).toBe('PrimeVue');
|
||||
expect(wrapper.find('.p-chip-remove-icon').exists()).toBe(true);
|
||||
});
|
||||
|
||||
it('should close icon work', async () => {
|
||||
await wrapper.find('.p-chip-remove-icon').trigger('click')
|
||||
|
||||
expect(wrapper.find('.p-chip.p-component').exists()).toBe(false);
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue