it('mounts inbound detail with a string-safe source order id',async()=>{routing.route.params={orderId:'IP-1'};routing.route.query={customerId:'10001'};constwrapper=mount(InboundOrderDetailView,{global:{plugins:[ElementPlus]}});awaitflushPromises();expect(getInboundPlan).toHaveBeenCalledWith('IP-1','10001');expect(wrapper.text()).toContain('9007199254740995');expect(wrapper.text()).toContain('洛杉矶仓')})
it('mounts inventory ledger as read-only business facts without exposing customer ids',async()=>{constwrapper=mount(InventoryTransactionsView,{global:{plugins:[createPinia(),ElementPlus]}});awaitflushPromises();expect(listInventoryLedger).toHaveBeenCalledWith(expect.objectContaining({page: 1,size: 10}));expect(listInventoryLedger).not.toHaveBeenCalledWith(expect.objectContaining({customerId: expect.anything()}));expect(wrapper.text()).toContain('客户甲');expect(wrapper.text()).toContain('NYEXX2608300001');expect(wrapper.text()).not.toContain('10001');expect(wrapper.text()).toContain('IP-1');expect(wrapper.text()).toContain('10');expect(wrapper.text()).toContain('不提供出库单跳转')})
it('renders the backend owner and complete short order number in last-mile detail',async()=>{routing.route.params={orderId:'9007199254740999'};constwrapper=mount(LastMileOrderDetailView,{global:{plugins:[createPinia(),ElementPlus]}});awaitflushPromises();expect(getLastMileOrder).toHaveBeenCalledWith('9007199254740999');expect(wrapper.text()).toContain('华远贸易');expect(wrapper.text()).toContain('LMO-260827-0001');expect(wrapper.get('.order-reference-text').attributes('title')).toBe('LMO-260827-0001')})