feat(shipping-notice): 落地 XFA 拆分、版面签名、统一进度与处理域履约
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
3a9fbac2fc
commit
d2b3d74def
571 files changed
+78064
-24681
No files matched your search
@@ -0,0 +1,42 @@
|
||||
/**
|
||||
* features/chat/shipping/shippingSubmissionFeedback.spec.ts
|
||||
* 用途:验收统一提交决策反馈结构(无弹窗、含短时标签码)。
|
||||
* 依赖:Vitest、shippingSubmissionFeedback。
|
||||
*/
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import {
|
||||
buildShippingSubmissionFeedback,
|
||||
createComposerContextId,
|
||||
createShippingSubmissionId,
|
||||
} from './shippingSubmissionFeedback';
|
||||
|
||||
describe('shippingSubmissionFeedback', () => {
|
||||
it('maps appended / created decisions to badge codes', () => {
|
||||
expect(buildShippingSubmissionFeedback({
|
||||
decision: 'appended',
|
||||
user_task_no: 'OT-1',
|
||||
run_no: 'RUN-1',
|
||||
created_new: false,
|
||||
}, 3)).toMatchObject({
|
||||
decision: 'appended',
|
||||
badgeCode: 'just_appended',
|
||||
fileCount: 3,
|
||||
recentAppendCount: 3,
|
||||
});
|
||||
expect(buildShippingSubmissionFeedback({
|
||||
decision: 'created',
|
||||
user_task_no: 'OT-2',
|
||||
run_no: 'RUN-2',
|
||||
created_new: true,
|
||||
}, 1)).toMatchObject({
|
||||
decision: 'created',
|
||||
badgeCode: 'just_created',
|
||||
createdNew: true,
|
||||
});
|
||||
});
|
||||
|
||||
it('creates stable-looking submission and composer ids', () => {
|
||||
expect(createShippingSubmissionId()).toMatch(/^SUB-/);
|
||||
expect(createComposerContextId()).toMatch(/^CMP-/);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user