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 PivotSortBtn from '@/components/Pivot/PivotUi/PivotSortBtn'
describe('PivotSortBtn.vue', () => {
it('switches order', async () => {
const wrapper = shallowMount(PivotSortBtn, {
props: {
modelValue: 'key_a_to_z',
'onUpdate:modelValue': e => wrapper.setProps({ modelValue: e })
}
})
expect(wrapper.props('modelValue')).to.equal('key_a_to_z')
await wrapper.find('.pivot-sort-btn').trigger('click')
expect(wrapper.props('modelValue')).to.equal('value_a_to_z')
await wrapper.setValue('value_a_to_z')
await wrapper.find('.pivot-sort-btn').trigger('click')
expect(wrapper.props('modelValue')).to.equal('value_z_to_a')
await wrapper.setValue('value_z_to_a')
await wrapper.find('.pivot-sort-btn').trigger('click')
expect(wrapper.props('modelValue')).to.equal('key_a_to_z')
})
})