Create ProgressSpinner.spec.js

pull/2342/head
Tuğçe Küçükoğlu 2022-03-22 13:16:33 +03:00
parent 05d84cfe44
commit 8fe7471020
1 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,24 @@
import { mount } from '@vue/test-utils';
import ProgressSpinner from './ProgressSpinner.vue';
describe('ProgressSpinner.vue', () => {
let wrapper;
beforeEach(() => {
wrapper = mount(ProgressSpinner, {
props: {
strokeWidth: '8',
fill: 'green',
animationDuration: '.5s'
}
});
});
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');
});
});