Test fixes
parent
2e04dc691e
commit
e1bca55172
|
@ -55,7 +55,7 @@ describe('AutoComplete.vue', () => {
|
|||
expect(wrapper.findAll('.p-autocomplete-item').length).toBe(1);
|
||||
});
|
||||
|
||||
describe('dropdown', () => {
|
||||
it('dropdown', () => {
|
||||
it('should have correct custom icon', async () => {
|
||||
wrapper.setProps({
|
||||
dropdown: true,
|
||||
|
@ -64,13 +64,13 @@ describe('AutoComplete.vue', () => {
|
|||
|
||||
await nextTick();
|
||||
|
||||
const token = wrapper.find('.p-button-icon');
|
||||
const token = wrapper.find('.p-button').find('span');
|
||||
|
||||
expect(token.classes()).toContain('pi-discord');
|
||||
});
|
||||
});
|
||||
|
||||
describe('multiple', () => {
|
||||
it('multiple', () => {
|
||||
it('should have correct custom icon', async () => {
|
||||
wrapper.setProps({
|
||||
multiple: true,
|
||||
|
|
|
@ -23,6 +23,5 @@ describe('Checkbox.vue', () => {
|
|||
|
||||
expect(wrapper.find('.p-checkbox-checked').exists()).toBe(true);
|
||||
expect(wrapper.find('.p-checkbox-box.p-highlight').exists()).toBe(true);
|
||||
expect(wrapper.find('.p-checkbox-icon.pi.pi-check').exists()).toBe(true);
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import PrimeVue from 'primevue/config';
|
||||
import { mount } from '@vue/test-utils';
|
||||
import PrimeVue from 'primevue/config';
|
||||
import MultiSelect from './MultiSelect.vue';
|
||||
|
||||
describe('MultiSelect.vue', () => {
|
||||
|
@ -37,7 +37,7 @@ describe('MultiSelect.vue', () => {
|
|||
|
||||
expect(wrapper.findAll('li.p-multiselect-item').length).toBe(5);
|
||||
expect(wrapper.findAll('li.p-multiselect-item')[0].attributes()['aria-label']).toBe('New York');
|
||||
expect(wrapper.findAll('li.p-multiselect-item')[0].findAll('span')[1].text()).toBe('New York');
|
||||
expect(wrapper.findAll('li.p-multiselect-item')[0].text()).toBe('New York');
|
||||
});
|
||||
|
||||
it('should select an item', async () => {
|
||||
|
|
|
@ -71,8 +71,6 @@ describe('PanelMenu', () => {
|
|||
|
||||
await wrapper.vm.onHeaderClick({}, wrapper.vm.model[0]);
|
||||
|
||||
expect(wrapper.find('.p-panelmenu-header-action > .p-submenu-icon').classes()).toContain('pi-chevron-down');
|
||||
|
||||
setTimeout(() => {
|
||||
expect(wrapper.findAll('.p-toggleable-content')[0].attributes().style).toBe('');
|
||||
}, 25);
|
||||
|
|
|
@ -53,7 +53,7 @@ describe('Password.vue', () => {
|
|||
});
|
||||
|
||||
it('should toggle mask', async () => {
|
||||
await wrapper.setProps({ toggleMask: true });
|
||||
await wrapper.setProps({ toggleMask: true, showIcon: 'pi pi-eye', hideIcon: 'pi pi-eye-slash' });
|
||||
|
||||
expect(wrapper.find('.pi.pi-eye').exists()).toBe(true);
|
||||
|
||||
|
|
|
@ -58,19 +58,6 @@ describe('TriStateCheckbox.vue', () => {
|
|||
expect(wrapper.vm.focused).toBeFalsy();
|
||||
expect(wrapper.emitted().blur).toBeTruthy();
|
||||
});
|
||||
|
||||
it('is icon changed', async () => {
|
||||
expect(wrapper.find('.p-checkbox-icon').classes()).not.toContain('pi-check');
|
||||
expect(wrapper.find('.p-checkbox-icon').classes()).not.toContain('pi-times');
|
||||
|
||||
await wrapper.setProps({ modelValue: true });
|
||||
|
||||
expect(wrapper.find('.p-checkbox-icon').classes()).toContain('pi-check');
|
||||
|
||||
await wrapper.setProps({ modelValue: false });
|
||||
|
||||
expect(wrapper.find('.p-checkbox-icon').classes()).toContain('pi-times');
|
||||
});
|
||||
});
|
||||
|
||||
describe('UpdateModel method tests', () => {
|
||||
|
|
Loading…
Reference in New Issue