feat(shipping-notice): 新增库存快照管理与RPA批量导出功能
This commit is contained in:
1 parent
fc694a8f43
commit
d54f51ddc3
48 files changed
+4970
-543
No files matched your search
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* features/chat/shipping/shippingStepper.spec.ts
|
||||
* 用途:验证发货通知七步 Stepper 的本地兜底状态映射。
|
||||
* 依赖:shippingStepper 纯函数、vitest。
|
||||
* 逻辑:后端 UI State 缺失时,前端仍需把关键人工介入态渲染为 blocked。
|
||||
*/
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { buildShippingWorkflowSteps } from './shippingStepper';
|
||||
|
||||
describe('shippingStepper', () => {
|
||||
it('marks inventory step as blocked when RPA inventory is exhausted', () => {
|
||||
// 关键断言:库存 RPA 获取失败是业务阻断态,不能在步骤条里继续显示为普通 current。
|
||||
const steps = buildShippingWorkflowSteps({
|
||||
process_status: 'waiting_inventory',
|
||||
pending_human_reason: 'rpa_exhausted',
|
||||
current_step: 'step3_inventory_prepare',
|
||||
});
|
||||
|
||||
expect(steps[2]?.status).toBe('blocked');
|
||||
});
|
||||
|
||||
it('marks inventory step as blocked when inventory source is unavailable', () => {
|
||||
// 关键断言:库存触发失败需要用户上传库存或重试,同样应在第 3 步显示异常。
|
||||
const steps = buildShippingWorkflowSteps({
|
||||
process_status: 'waiting_inventory',
|
||||
pending_human_reason: 'inv_unavail',
|
||||
current_step: 'step3_inventory_prepare',
|
||||
});
|
||||
|
||||
expect(steps[2]?.status).toBe('blocked');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user