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('