1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2026-02-04 15:38:55 +08:00

change repo structure

This commit is contained in:
lana-k
2026-01-15 21:53:12 +01:00
parent 85b5a200e2
commit 7edc196a02
64 changed files with 74 additions and 74 deletions

View File

@@ -0,0 +1,26 @@
import { expect } from 'chai'
import { shallowMount } from '@vue/test-utils'
import LoadingIndicator from '@/components/Common/LoadingIndicator'
describe('LoadingIndicator.vue', () => {
it('Calculates animation class', async () => {
const wrapper = shallowMount(LoadingIndicator, {
props: { progress: 0 }
})
expect(wrapper.find('svg').classes()).to.contain('progress')
await wrapper.setProps({ progress: undefined })
expect(wrapper.find('svg').classes()).to.not.contain('progress')
expect(wrapper.find('svg').classes()).to.contain('loading')
})
it('Calculates arc', async () => {
const wrapper = shallowMount(LoadingIndicator, {
props: { progress: 50 }
})
// The lendth of circle in the component is 50.24. If progress is 50% then resulting arc
// should be 25.12
expect(
wrapper.find('.loader-svg.front').element.style.strokeDasharray
).to.equal('25.12px, 25.12px')
})
})