优化
This commit is contained in:
@@ -92,6 +92,18 @@ describe('ContainerCustomsPanel', () => {
|
||||
expect(buttonTexts(wrapper)).not.toContain('导出买单 XLSX')
|
||||
})
|
||||
|
||||
it('shows a pending state instead of an error before loading is completed', async () => {
|
||||
api.get.mockResolvedValue(null)
|
||||
const wrapper = mount(ContainerCustomsPanel, {
|
||||
props: { loadingPlanId: '2097922185010147329', canList: true, canManage: false, departureState: 'WAITING_OTHER_GATES' },
|
||||
global: { plugins: [ElementPlus] },
|
||||
})
|
||||
await flushPromises()
|
||||
|
||||
expect(wrapper.text()).toContain('当前装柜计划尚未完成,完成装柜后可处理报关')
|
||||
expect(wrapper.text()).not.toContain('整柜报关加载失败')
|
||||
})
|
||||
|
||||
it('allows completion upload and overwrite only while DECLARING with manage permission', async () => {
|
||||
let wrapper = await render('DECLARING', true, false)
|
||||
expect(wrapper.text()).toContain('上传报关完成文件')
|
||||
|
||||
Reference in New Issue
Block a user