fix(chat-input-bar,shipping-process-gate): 修复库存RPA重试按钮隐藏问题
- 重构发货通知流程的Gate投影逻辑,统一库存RPA失败后的恢复动作,避免被降级为人工上传入口 - 新增全覆盖单元测试验证恢复动作逻辑
This commit is contained in:
1 parent
3c0e08377c
commit
eee9163ce0
12 files changed
+350
-78
No files matched your search
+48
@@ -166,4 +166,52 @@ describe('ProcessGateRecoveryCard', () => {
|
||||
expect(wrapper.find('[data-testid="process-gate-recovery-targets"]').exists()).toBe(false);
|
||||
expect(wrapper.find('[data-testid="process-gate-recovery-primary"]').exists()).toBe(true);
|
||||
});
|
||||
|
||||
it('shows inventory upload as a secondary entry beside retrying inventory retrieval', async () => {
|
||||
const wrapper = mount(ProcessGateRecoveryCard, {
|
||||
props: {
|
||||
summary: baseSummary({
|
||||
current_blocking_gate: {
|
||||
...baseSummary().current_blocking_gate!,
|
||||
gate_code: 'inventory_preparation',
|
||||
next_action_code: 'retry_inventory_preparation',
|
||||
},
|
||||
next_action_code: 'retry_inventory_preparation',
|
||||
allowed_actions: ['retry_inventory_preparation', 'upload_inventory_file'],
|
||||
task_no: 'SN-TEST-001',
|
||||
}),
|
||||
canHandle: true,
|
||||
},
|
||||
global: { plugins: [i18n] },
|
||||
});
|
||||
|
||||
const upload = wrapper.get('[data-testid="process-gate-inventory-upload"]');
|
||||
expect(upload.text()).toContain('上传库存文件');
|
||||
await upload.trigger('click');
|
||||
expect(wrapper.emitted('navigate')).toHaveLength(1);
|
||||
});
|
||||
|
||||
it('opens local upload registration when requested by the order review workbench', async () => {
|
||||
const wrapper = mount(ProcessGateRecoveryCard, {
|
||||
props: {
|
||||
summary: baseSummary({
|
||||
current_blocking_gate: {
|
||||
...baseSummary().current_blocking_gate!,
|
||||
gate_code: 'inventory_preparation',
|
||||
next_action_code: 'retry_inventory_preparation',
|
||||
},
|
||||
next_action_code: 'retry_inventory_preparation',
|
||||
allowed_actions: ['retry_inventory_preparation', 'upload_inventory_file'],
|
||||
task_no: 'SN-TEST-001',
|
||||
}),
|
||||
canHandle: true,
|
||||
inventoryUploadMode: 'local',
|
||||
},
|
||||
global: { plugins: [i18n] },
|
||||
});
|
||||
|
||||
await wrapper.get('[data-testid="process-gate-inventory-upload"]').trigger('click');
|
||||
expect(wrapper.emitted('manualUpload')).toHaveLength(1);
|
||||
expect(wrapper.emitted('navigate')).toBeUndefined();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user