20260903173038

This commit is contained in:
oneao committed 2026-09-03 17:30:39 +08:00
1 parent c8940f6e03
commit 0faf44cffc
55 files changed
+3278 -208

No files matched your search

@@ -0,0 +1,28 @@
import { mount } from '@vue/test-utils'
import { createPinia, setActivePinia } from 'pinia'
import { beforeEach, describe, expect, it } from 'vitest'
import FmsQueryControl from '@/components/fms-module-list/FmsQueryControl.vue'
import FmsQueryToolbar from '@/components/fms-module-list/FmsQueryToolbar.vue'
describe('fms-module-list components', () => {
beforeEach(() => setActivePinia(createPinia()))
it('mounts a text query control with the new UI kit', () => {
const wrapper = mount(FmsQueryControl, {
props: {
item: {
field: { b_field: 'name', b_type: 'input' },
config: { b_operator: 'like', b_component: 'input' },
},
modelValue: '',
},
})
expect(wrapper.find('input').exists()).toBe(true)
})
it('mounts an empty toolbar without legacy Ant components', () => {
const wrapper = mount(FmsQueryToolbar)
expect(wrapper.find('.fms-query-toolbar').exists()).toBe(true)
expect(wrapper.html()).not.toContain('<a-')
})
})