- fix AutoComplete.spec.js, Avatar.spec.js, Breadcrumb.spec.js, Chip.spec.js

pull/6170/head
uros 2024-08-01 23:01:15 +02:00
parent a378599783
commit aa1dafae95
4 changed files with 9 additions and 9 deletions

View File

@ -51,8 +51,8 @@ describe('AutoComplete.vue', () => {
suggestions: [{ name: 'Bahrain', code: 'BH' }]
});
expect(wrapper.find('.p-autocomplete-items').exists()).toBe(true);
expect(wrapper.findAll('.p-autocomplete-item').length).toBe(1);
expect(wrapper.find('.p-autocomplete-list').exists()).toBe(true);
expect(wrapper.findAll('.p-autocomplete-option').length).toBe(1);
});
it('should show overlay and empty-message if there are no suggestions', async () => {
@ -65,8 +65,8 @@ describe('AutoComplete.vue', () => {
suggestions: []
});
expect(wrapper.find('.p-autocomplete-items').exists()).toBe(true);
expect(wrapper.findAll('.p-autocomplete-item').length).toBe(0);
expect(wrapper.find('.p-autocomplete-list').exists()).toBe(true);
expect(wrapper.findAll('.p-autocomplete-option').length).toBe(0);
expect(wrapper.find('.p-autocomplete-empty-message').exists()).toBe(true);
});

View File

@ -20,8 +20,8 @@ describe('Avatar.vue', () => {
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');
expect(wrapper.find('.p-avatar-label').exists()).toBe(true);
expect(wrapper.find('.p-avatar-label').text()).toBe('T');
});
it('should exist', async () => {

View File

@ -27,7 +27,7 @@ describe('Breadcrumb', () => {
});
expect(wrapper.find('.p-breadcrumb.p-component').exists()).toBe(true);
expect(wrapper.findAll('.p-menuitem-separator').length).toBe(5);
expect(wrapper.findAll('.p-menuitem-text').length).toBe(5);
expect(wrapper.findAll('.p-breadcrumb-separator').length).toBe(5);
expect(wrapper.findAll('.p-breadcrumb-item-label').length).toBe(5);
});
});

View File

@ -21,7 +21,7 @@ describe('Chip.vue', () => {
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-label').text()).toBe('PrimeVue');
expect(wrapper.find('.p-chip-remove-icon').exists()).toBe(true);
});