perf(shipping-notice): 优化发货任务性能,修复上传流程与终态问题
This commit is contained in:
1 parent
434c04ed2d
commit
bcdd8285ae
29 files changed
+1074
-128
No files matched your search
@@ -353,6 +353,36 @@ describe('ShippingOrderExtractionCard', () => {
|
||||
expect(wrapper.text()).not.toContain('stale.pdf');
|
||||
});
|
||||
|
||||
it('renders a completed non-order attachment without a spinner', async () => {
|
||||
const child = {
|
||||
workItemNo: 'DOCUMENT:NON-ORDER', sourceSummary: { filename: 'not-an-order.pdf', documentId: 1 },
|
||||
status: 'completed', stage: 'completed', userStatus: 'completed', userStage: 'completed',
|
||||
facts: { uploadState: 'not_created' }, uiState: { status: 'completed', stage: 'completed' },
|
||||
} as any;
|
||||
const task = {
|
||||
user_task_no: 'INTAKE:SNI-NON-ORDER', title: 'mail.eml', file_count: 1,
|
||||
userGroup: 'completed', group: 'completed', aggregateChildren: [child],
|
||||
aggregateSummary: { intakeNo: 'SNI-NON-ORDER', total: 1, completed: 1, processing: 0, needsAction: 0, failed: 0, stages: ['completed'], reasonCodes: [] },
|
||||
} as any;
|
||||
const wrapper = mount(ShippingOrderExtractionCard, {
|
||||
props: { state: buildState({ status: 'completed' }) },
|
||||
global: { plugins: [i18n], provide: { [SHIPPING_WORKFLOW_KEY as symbol]: {
|
||||
processing: ref({
|
||||
ui_state: { status: 'completed' },
|
||||
summary: { total_files: 1, completed_files: 1, waiting_human_files: 0, failed_files: 0 },
|
||||
status_groups: { failed: [], waiting_human: [], processing: [], completed: [task], cancelled: [], archived: [] },
|
||||
}),
|
||||
processingWorkItems: ref([]),
|
||||
} } },
|
||||
});
|
||||
|
||||
await wrapper.get('[data-testid="shipping-order-extraction-status-groups"] section button').trigger('click');
|
||||
await wrapper.get('[data-testid="shipping-order-extraction-eml-completed-INTAKE:SNI-NON-ORDER"] button').trigger('click');
|
||||
|
||||
expect(wrapper.findAll('.animate-spin')).toHaveLength(0);
|
||||
expect(wrapper.get('[data-testid="shipping-order-extraction-child-status-DOCUMENT:NON-ORDER"]').text()).not.toContain('处理中');
|
||||
});
|
||||
|
||||
it('uses the authoritative attachment total when a historical message only carries the EML task count', () => {
|
||||
const task = {
|
||||
user_task_no: 'INTAKE:SNI-MAILS', title: 'mail-batch.eml', file_count: 30,
|
||||
|
||||
Reference in new issue
Block a user