This commit is contained in:
2026-09-10 14:16:20 +08:00
parent 33b79edd18
commit c3d69d74c2
2 changed files with 18 additions and 0 deletions
@@ -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('上传报关完成文件')