优化
This commit is contained in:
@@ -73,7 +73,7 @@ describe('outbound candidate search and selection', () => {
|
||||
|
||||
it('searches on query, selects every filtered page, shows partial page selection and clears the selection', async () => {
|
||||
await openCreate()
|
||||
const query = wrapper.findAllComponents(ElInput).find(item => item.attributes('aria-label') === '搜索可出库订单')!
|
||||
const query = wrapper.findAllComponents(ElInput).find(item => item.props('ariaLabel') === '搜索可出库订单')!
|
||||
query.vm.$emit('update:modelValue', 'MATCH')
|
||||
await flushPromises()
|
||||
expect(wrapper.text()).toContain('全选筛选结果(7)')
|
||||
@@ -82,7 +82,8 @@ describe('outbound candidate search and selection', () => {
|
||||
expect(wrapper.text()).toContain('全选筛选结果(6)')
|
||||
await clickButton('全选筛选结果')
|
||||
expect(wrapper.text()).toContain('已选择 6 条')
|
||||
await clickButton('重置')
|
||||
await wrapper.get('.candidate-query').findAll('button').find(item => item.text() === '重置')!.trigger('click')
|
||||
await flushPromises()
|
||||
candidatePagination().vm.$emit('update:current-page', 2)
|
||||
await flushPromises()
|
||||
expect(pageCheckbox().props('indeterminate')).toBe(true)
|
||||
@@ -102,7 +103,7 @@ describe('outbound candidate search and selection', () => {
|
||||
expect(pagination.props('currentPage')).toBe(1)
|
||||
expect(wrapper.text()).toContain('第 1 / 1 页')
|
||||
expect(wrapper.text()).toContain('已选择 7 条')
|
||||
const warehouse = wrapper.findAllComponents(ElSelect).find(item => item.attributes('aria-label') === '搜索海外仓')!
|
||||
const warehouse = wrapper.findAllComponents(ElSelect).find(item => item.props('ariaLabel') === '搜索海外仓')!
|
||||
expect(warehouse.props('filterable')).toBe(true)
|
||||
warehouse.vm.$emit('update:modelValue', 'warehouse-b')
|
||||
warehouse.vm.$emit('change', 'warehouse-b')
|
||||
|
||||
Reference in New Issue
Block a user