chore(shipping-notice): 统一货代发货生命周期阶段命名并优化全链路业务逻辑
This commit is contained in:
1 parent
5ef8329bd8
commit
4ec4e57005
183 files changed
+14653
-3936
No files matched your search
@@ -77,6 +77,44 @@ describe('ShippingOrderExtractionCard', () => {
|
||||
expect(wrapper.get('[data-testid="shipping-order-extraction-open-batch-workbench"]').exists()).toBe(true);
|
||||
});
|
||||
|
||||
it('does not present historical handling items or CTA as current work when the live projection exists', () => {
|
||||
const wrapper = mount(ShippingOrderExtractionCard, {
|
||||
props: {
|
||||
state: buildState({
|
||||
status: 'review_required',
|
||||
availableActions: ['review_candidate'],
|
||||
primaryNotice: 'candidate_confirmation',
|
||||
handlingItems: [{
|
||||
category: 'candidate_confirmation', count: 2, reasonCodes: [],
|
||||
affectedRefs: [], primaryAction: 'review_candidate',
|
||||
}],
|
||||
}),
|
||||
},
|
||||
global: {
|
||||
plugins: [i18n],
|
||||
provide: {
|
||||
[SHIPPING_WORKFLOW_KEY as symbol]: {
|
||||
processing: ref({
|
||||
ui_state: { status: 'running' },
|
||||
summary: { total_files: 1, completed_files: 0, waiting_human_files: 0, failed_files: 0 },
|
||||
status_groups: {
|
||||
failed: [], waiting_human: [], processing: [{
|
||||
user_task_no: 'OT-LIVE', title: 'live.pdf', file_count: 1,
|
||||
userGroup: 'processing', group: 'processing', aggregateChildren: [],
|
||||
}], completed: [], cancelled: [], archived: [],
|
||||
},
|
||||
}),
|
||||
processingWorkItems: ref([]),
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
expect(wrapper.text()).not.toContain('候选待人工确认');
|
||||
expect(wrapper.find('[data-testid="shipping-order-extraction-handling-summary"]').exists()).toBe(false);
|
||||
expect(wrapper.find('[data-testid="shipping-order-extraction-primary-action"]').exists()).toBe(false);
|
||||
});
|
||||
|
||||
it('collapses file-level progress when the batch workbench is open', () => {
|
||||
const wrapper = mount(ShippingOrderExtractionCard, {
|
||||
props: { state: buildState(), runNo: 'SNER-COMPACT', compactProgress: true },
|
||||
@@ -206,7 +244,7 @@ describe('ShippingOrderExtractionCard', () => {
|
||||
await wrapper.get('[data-testid="shipping-order-extraction-eml-failed-INTAKE:SNI-DETAIL"] button').trigger('click');
|
||||
expect(wrapper.get('[data-testid="shipping-order-extraction-eml-children"]').text()).toContain('failed.pdf');
|
||||
expect(wrapper.text()).toContain('异常 1');
|
||||
expect(wrapper.text()).toContain('文件处理需要人工确认');
|
||||
expect(wrapper.text()).toContain('当前步骤需要人工处理');
|
||||
expect(wrapper.text()).not.toContain('PARSE_FAILED');
|
||||
expect(wrapper.get('[data-testid="shipping-order-extraction-child-status-OT-CHILD-1"]')
|
||||
.classes()).toContain('text-rose-600');
|
||||
@@ -253,6 +291,8 @@ describe('ShippingOrderExtractionCard', () => {
|
||||
});
|
||||
|
||||
expect(wrapper.text()).toContain('共 2 个文件');
|
||||
// 关键断言:待人工处理不是完成,聊天摘要必须与批次中心 completed_files 同口径。
|
||||
expect(wrapper.text()).toContain('0/2 已处理');
|
||||
expect(wrapper.text()).not.toContain('共 6 个文件');
|
||||
expect(wrapper.text()).not.toContain('stale.pdf');
|
||||
});
|
||||
@@ -454,7 +494,7 @@ describe('ShippingOrderExtractionCard', () => {
|
||||
expect(wrapper.text()).toContain('3 个文件');
|
||||
expect(wrapper.text()).toContain('系统处理中');
|
||||
expect(wrapper.text()).toContain('处理时间偏长');
|
||||
expect(wrapper.text()).toContain('查看详情');
|
||||
expect(wrapper.text()).toContain('打开批次进度中心');
|
||||
expect(wrapper.text()).not.toContain('刷新状态');
|
||||
expect(wrapper.text()).not.toContain('取消本次识别');
|
||||
expect(wrapper.text()).not.toContain('PO-450003.pdf');
|
||||
@@ -527,7 +567,7 @@ describe('ShippingOrderExtractionCard', () => {
|
||||
});
|
||||
expect(wrapper.text()).toContain('订单候选已生成');
|
||||
expect(wrapper.text()).toContain('候选待人工确认 · 2 项');
|
||||
expect(wrapper.text()).toContain('继续处理');
|
||||
expect(wrapper.text()).toContain('打开批次进度中心');
|
||||
expect(wrapper.text()).not.toContain('部分附件需人工处理');
|
||||
expect(wrapper.findAll('[data-testid="shipping-order-extraction-handling-item"]').length).toBe(0);
|
||||
});
|
||||
@@ -586,8 +626,8 @@ describe('ShippingOrderExtractionCard', () => {
|
||||
expect(wrapper.text()).not.toContain('ST-88');
|
||||
expect(wrapper.findAll('[data-testid="shipping-order-extraction-handling-item"]').length).toBe(0);
|
||||
expect(wrapper.findAll('[data-testid="shipping-order-extraction-handling-primary-action"]').length).toBe(0);
|
||||
// 失败优先:唯一主 CTA 为重试解析。
|
||||
expect(wrapper.find('[data-testid="shipping-order-extraction-primary-action"]').text()).toContain('重试解析');
|
||||
// 当前原型将执行入口统一收敛到批次进度中心,旧消息卡不再保留重试 CTA。
|
||||
expect(wrapper.find('[data-testid="shipping-order-extraction-primary-action"]').exists()).toBe(false);
|
||||
});
|
||||
|
||||
it('keeps only the batch workbench CTA for review-required without retry', () => {
|
||||
|
||||
Reference in new issue
Block a user