diff --git a/src/components/avatar/Avatar.spec.js b/src/components/avatar/Avatar.spec.js new file mode 100644 index 000000000..896df5da5 --- /dev/null +++ b/src/components/avatar/Avatar.spec.js @@ -0,0 +1,20 @@ +import { mount } from '@vue/test-utils'; +import Avatar from './Avatar.vue'; + +describe('Avatar.vue', () => { + it('should exist', () => { + const wrapper = mount(Avatar, { + props: { + label: 'T', + size: 'large', + shape: 'circle' + } + }); + + expect(wrapper.find('.p-avatar.p-component').exists()).toBe(true); + expect(wrapper.find('.p-avatar-lg').exists()).toBe(true); + expect(wrapper.find('.p-avatar-circle').exists()).toBe(true); + expect(wrapper.find('.p-avatar-text').exists()).toBe(true); + expect(wrapper.find('.p-avatar-text').text()).toBe('T'); + }); +}); \ No newline at end of file diff --git a/src/components/avatargroup/AvatarGroup.spec.js b/src/components/avatargroup/AvatarGroup.spec.js new file mode 100644 index 000000000..4f0e69de0 --- /dev/null +++ b/src/components/avatargroup/AvatarGroup.spec.js @@ -0,0 +1,21 @@ +import { mount } from '@vue/test-utils'; +import AvatarGroup from './AvatarGroup.vue'; +import Avatar from '@/components/avatar/Avatar.vue'; + +describe('AvatarGroup.vue', () => { + it('should exist', () => { + const wrapper = mount(AvatarGroup, { + global: { + components: { + Avatar + } + }, + slots: { + default: '' + } + }); + + expect(wrapper.find('.p-avatar-group.p-component').exists()).toBe(true); + expect(wrapper.find('.p-avatar.p-component').exists()).toBe(true); + }); +}); \ No newline at end of file