From 48d6c313977707551859f21a274ea1e0ccb05e30 Mon Sep 17 00:00:00 2001 From: ouyangxq <775153912@qq.com> Date: Mon, 26 Oct 2026 17:23:38 +0800 Subject: [PATCH] test(admin): isolate merged inbound fees and shortage components --- .../pages/InboundOrderDetailView.shortage.test.ts | 2 +- .../overseas-warehouse/pages/InboundOrderDetailView.test.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/modules/overseas-warehouse/pages/InboundOrderDetailView.shortage.test.ts b/src/modules/overseas-warehouse/pages/InboundOrderDetailView.shortage.test.ts index 2e141647..b511def1 100644 --- a/src/modules/overseas-warehouse/pages/InboundOrderDetailView.shortage.test.ts +++ b/src/modules/overseas-warehouse/pages/InboundOrderDetailView.shortage.test.ts @@ -14,7 +14,7 @@ it('provides the scoped plan facts and reloads after shortage confirmation', asy status: 'PENDING_RECONCILIATION', expectedPackageCount: 21, pickedPackageCount: 20, lineCount: 0, palletCount: 0, totalGrossWeightKg: 0, totalNetWeightKg: 0, totalVolumeCbm: 0, lines: [], pallets: [], allocations: [] } vi.mocked(getInboundPlan).mockResolvedValue(detail) - const wrapper = mount(InboundOrderDetailView, { global: { plugins: [ElementPlus], stubs: { DataTable: true, AppDialog: true } } }) + const wrapper = mount(InboundOrderDetailView, { global: { plugins: [ElementPlus], stubs: { DataTable: true, AppDialog: true, BusinessDocumentFees: true } } }) await flushPromises() expect(wrapper.findComponent({ name: 'InboundShortageConfirmation' }).props('detail')).toEqual(detail) expect(wrapper.text()).toContain('待差异核对') diff --git a/src/modules/overseas-warehouse/pages/InboundOrderDetailView.test.ts b/src/modules/overseas-warehouse/pages/InboundOrderDetailView.test.ts index f996dfab..42142066 100644 --- a/src/modules/overseas-warehouse/pages/InboundOrderDetailView.test.ts +++ b/src/modules/overseas-warehouse/pages/InboundOrderDetailView.test.ts @@ -22,7 +22,7 @@ describe('InboundOrderDetailView fees', () => { }) it('uses the loaded inbound plan identity without substituting its source order', async () => { - const wrapper = mount(InboundOrderDetailView, { global: { plugins: [ElementPlus], stubs: { DataTable: true, AppDialog: true } } }) + const wrapper = mount(InboundOrderDetailView, { global: { plugins: [ElementPlus], stubs: { DataTable: true, AppDialog: true, InboundShortageConfirmation: true } } }) await flushPromises() expect(getInboundPlan).toHaveBeenCalledWith('PLAN-1', '9007199254741001') expect(wrapper.findComponent({ name: 'BusinessDocumentFees' }).props()).toEqual({ @@ -34,7 +34,7 @@ describe('InboundOrderDetailView fees', () => { it('does not expose fee operations when the customer scope is absent', async () => { route.query = {} - const wrapper = mount(InboundOrderDetailView, { global: { plugins: [ElementPlus], stubs: { DataTable: true, AppDialog: true } } }) + const wrapper = mount(InboundOrderDetailView, { global: { plugins: [ElementPlus], stubs: { DataTable: true, AppDialog: true, InboundShortageConfirmation: true } } }) await flushPromises() expect(getInboundPlan).not.toHaveBeenCalled() expect(wrapper.findComponent({ name: 'BusinessDocumentFees' }).exists()).toBe(false)