From 8fe7471020857ead5ad444a2eb0e2551d5e21f25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Tue, 22 Mar 2022 13:16:33 +0300 Subject: [PATCH] Create ProgressSpinner.spec.js --- .../progressspinner/ProgressSpinner.spec.js | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/components/progressspinner/ProgressSpinner.spec.js diff --git a/src/components/progressspinner/ProgressSpinner.spec.js b/src/components/progressspinner/ProgressSpinner.spec.js new file mode 100644 index 000000000..d1824aef6 --- /dev/null +++ b/src/components/progressspinner/ProgressSpinner.spec.js @@ -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'); + }); +}); \ No newline at end of file