feat(shipping-notice): 收敛订单处理状态与履约门禁

This commit is contained in:
hugo committed 2026-09-07 09:42:12 +08:00
1 parent bffcd55b40
commit 70dd0051b8
153 files changed
+10916 -4296

No files matched your search

@@ -212,6 +212,19 @@ describe('normalizeShippingProcessingProjection', () => {
expect(normalizeShippingProcessingProjection({ status: 'processing' })).toBeNull();
});
it('returns null for already-camelCase DTO (must only run at API snake boundary)', () => {
// 关键断言:normalize 只读 snake;若 composable 对 API 已规范化结果再跑一遍,
// 会把 workItemNo 读空并整包洗成 null(右卡永久「获取中/待机」)。
expect(normalizeShippingProcessingProjection({
workItemNo: 'OT-1',
workItemType: 'order_task',
status: 'waiting_review',
stage: 'inventory_matching',
userStatus: 'waiting_human',
uiState: { status: 'waiting_human', lifecycleStage: 'fulfillment_prep' },
})).toBeNull();
});
it('normalizes work_items arrays', () => {
const items = normalizeShippingProcessingWorkItems([
{ work_item_no: 'OT-A', work_item_type: 'order_task', status: 'processing', stage: 'document_parsing' },