- fix Select.spec.js, Rating.spec.js, RadioButton.spec.js, ProgressSpinner.spec.js
parent
74bf24060a
commit
d26a7b74e4
|
@ -15,10 +15,10 @@ describe('ProgressSpinner.vue', () => {
|
|||
});
|
||||
|
||||
it('should exist', () => {
|
||||
expect(wrapper.find('.p-progress-spinner').exists()).toBe(true);
|
||||
expect(wrapper.find('svg.p-progress-spinner-svg').exists()).toBe(true);
|
||||
expect(wrapper.find('svg.p-progress-spinner-svg').attributes().style).toBe('animation-duration: .5s;');
|
||||
expect(wrapper.find('circle.p-progress-spinner-circle').attributes().fill).toBe('green');
|
||||
expect(wrapper.find('circle.p-progress-spinner-circle').attributes().strokeMiterlimit).toBe('10');
|
||||
expect(wrapper.find('.p-progressspinner').exists()).toBe(true);
|
||||
expect(wrapper.find('svg.p-progressspinner-spin').exists()).toBe(true);
|
||||
expect(wrapper.find('svg.p-progressspinner-spin').attributes().style).toBe('animation-duration: .5s;');
|
||||
expect(wrapper.find('circle.p-progressspinner-circle').attributes().fill).toBe('green');
|
||||
expect(wrapper.find('circle.p-progressspinner-circle').attributes().strokeMiterlimit).toBe('10');
|
||||
});
|
||||
});
|
||||
|
|
|
@ -43,7 +43,7 @@ describe('RadioButton.vue', () => {
|
|||
await wrapper.setProps({ modelValue: 'Tatooine' });
|
||||
|
||||
expect(wrapper.vm.checked).toBe(true);
|
||||
expect(wrapper.find('.p-radiobutton').classes()).toContain('p-highlight');
|
||||
expect(wrapper.find('.p-radiobutton').classes()).toContain('p-radiobutton-checked');
|
||||
});
|
||||
|
||||
it('When component focused onFocus method should be called', async () => {
|
||||
|
|
|
@ -29,7 +29,7 @@ describe('Rating.vue', () => {
|
|||
});
|
||||
|
||||
it('When star is clicked, onOptionClick method should triggered', async () => {
|
||||
await wrapper.find('.p-rating-item').trigger('click');
|
||||
await wrapper.find('.p-rating-option').trigger('click');
|
||||
|
||||
expect(wrapper.find('[data-p-focused="true"]').exists()).toBe(true);
|
||||
});
|
||||
|
|
|
@ -21,7 +21,7 @@ describe('Select.vue', () => {
|
|||
|
||||
it('should Select exist', () => {
|
||||
expect(wrapper.find('.p-select.p-component').exists()).toBe(true);
|
||||
expect(wrapper.find('.p-select-panel').exists()).toBe(true);
|
||||
expect(wrapper.find('.p-select-overlay').exists()).toBe(true);
|
||||
expect(wrapper.find('.p-select-empty-message').exists()).toBe(true);
|
||||
expect(wrapper.find('.p-inputwrapper-filled').exists()).toBe(false);
|
||||
expect(wrapper.find('.p-inputwrapper-focus').exists()).toBe(true);
|
||||
|
@ -58,7 +58,7 @@ describe('option checks', () => {
|
|||
|
||||
it('should show the options', () => {
|
||||
expect(wrapper.find('.p-select-label.p-placeholder').text()).toBe('Select a City');
|
||||
expect(wrapper.find('.p-select-items-wrapper > .p-select-list').exists()).toBe(true);
|
||||
expect(wrapper.find('.p-select-list-container > .p-select-list').exists()).toBe(true);
|
||||
expect(wrapper.find('.p-select-option').exists()).toBe(true);
|
||||
expect(wrapper.findAll('.p-select-option').length).toBe(5);
|
||||
expect(wrapper.findAll('.p-select-option')[0].text()).toBe('New York');
|
||||
|
@ -78,7 +78,7 @@ describe('clear checks', () => {
|
|||
},
|
||||
props: {
|
||||
clearIcon: 'pi pi-discord',
|
||||
modelValue: 'value',
|
||||
modelValue: { name: 'New York', code: 'NY' },
|
||||
showClear: true,
|
||||
options: [
|
||||
{ name: 'New York', code: 'NY' },
|
||||
|
|
Loading…
Reference in New Issue