feat(shipping-notice): 落地 XFA 拆分、版面签名、统一进度与处理域履约

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
hugoandCursor committed 2026-08-06 10:18:37 +08:00
1 parent 3a9fbac2fc
commit d2b3d74def
571 files changed
+78064 -24681

No files matched your search

@@ -5,7 +5,10 @@
* 逻辑:后端 UI State 缺失时,前端仍需把关键人工介入态渲染为 blocked。
*/
import { describe, expect, it } from 'vitest';
import { buildShippingWorkflowSteps } from './shippingStepper';
import {
applyShippingProcessingStageToSteps,
buildShippingWorkflowSteps,
} from './shippingStepper';
describe('shippingStepper', () => {
it('marks inventory step as blocked when RPA inventory is exhausted', () => {
@@ -29,4 +32,19 @@ describe('shippingStepper', () => {
expect(steps[2]?.status).toBe('blocked');
});
it('overlays unified processing stage onto base stepper steps', () => {
const base = buildShippingWorkflowSteps({
process_status: 'parsed',
current_step: 'step2_parse_confirm',
});
const overlaid = applyShippingProcessingStageToSteps(base, {
status: 'waiting_review',
stage: 'waiting_review',
currentGate: { status: 'blocked' },
});
// 关键断言:统一投影 waiting_review 应把第 2 步标为 blocked,而非沿用旧 process_status。
expect(overlaid[1]?.status).toBe('blocked');
expect(overlaid[0]?.status).toBe('completed');
});
});