20260929172211
This commit is contained in:
1 parent
ebeeca45b6
commit
f337ff1621
16 files changed
+1997
-134
No files matched your search
@@ -63,13 +63,15 @@ describe('fms-module-list components', () => {
|
||||
en.unmount()
|
||||
})
|
||||
|
||||
it('快捷筛选网格列数按条件数收缩(只有一个条件时不占 4 列宽)', () => {
|
||||
it('快捷筛选列数按条件占用收缩(普通条件 200px 一列,区间/日期跨两列)', () => {
|
||||
const one = mount(FmsQuickFilters, {
|
||||
props: { items: [queryItem('b_name')], modelValue: {} },
|
||||
})
|
||||
expect(one.find('.quick-grid').element.style.gridTemplateColumns).toBe(
|
||||
'repeat(1, minmax(0, 288px))',
|
||||
'repeat(1, minmax(0, 200px))',
|
||||
)
|
||||
// 普通单值控件只占一列,不跨列
|
||||
expect(one.find('.quick-field').element.style.gridColumn).toBe('')
|
||||
one.unmount()
|
||||
|
||||
const four = mount(FmsQuickFilters, {
|
||||
@@ -79,9 +81,21 @@ describe('fms-module-list components', () => {
|
||||
},
|
||||
})
|
||||
expect(four.find('.quick-grid').element.style.gridTemplateColumns).toBe(
|
||||
'repeat(4, minmax(0, 288px))',
|
||||
'repeat(4, minmax(0, 200px))',
|
||||
)
|
||||
four.unmount()
|
||||
|
||||
// 日期区间(预设下拉 + 两端)跨两列:列数按占用列求和,宽控件不会被挤到下一行
|
||||
const mixed = mount(FmsQuickFilters, {
|
||||
props: { items: [rangeQueryItem('date'), queryItem('b_canuse')], modelValue: {} },
|
||||
})
|
||||
expect(mixed.find('.quick-grid').element.style.gridTemplateColumns).toBe(
|
||||
'repeat(3, minmax(0, 200px))',
|
||||
)
|
||||
const [wide, narrow] = mixed.findAll('.quick-field')
|
||||
expect(wide.element.style.gridColumn).toBe('span 2')
|
||||
expect(narrow.element.style.gridColumn).toBe('')
|
||||
mixed.unmount()
|
||||
})
|
||||
|
||||
it('快捷筛选「查询」提交草稿、「重置」交给页面处理', async () => {
|
||||
|
||||
@@ -216,7 +216,7 @@ describe('模块权限面板:权限点表(定宽 / 密集)', () => {
|
||||
|
||||
// colResizable + v-model:columns:表格按列宽定宽,拖过的列宽可回写
|
||||
const powerTable = wrapper.findAllComponents({ name: 'FmsTable' })[0]
|
||||
expect(powerTable.props('colResizable')).toBe(true)
|
||||
expect(powerTable.props('colResizable')).toMatchObject({ disabled: expect.any(Function) })
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
Reference in new issue
Block a user