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
@@ -348,9 +348,10 @@ def test_formal_gate_attempt_creates_preparation_lineage_and_passes_gate(app, mo
|
||||
gate.next_action_code = 'retry_inventory_preparation'
|
||||
db.session.commit()
|
||||
|
||||
captured_payload = {}
|
||||
monkeypatch.setattr(
|
||||
'app.services.shipping_notice.inventory_workflow.ensure_inventory',
|
||||
lambda payload: {
|
||||
lambda payload: captured_payload.update(payload) or {
|
||||
'status': 'success',
|
||||
'data': {
|
||||
'rpa': {
|
||||
@@ -380,6 +381,7 @@ def test_formal_gate_attempt_creates_preparation_lineage_and_passes_gate(app, mo
|
||||
task_id=task.id, execution_id=execution.id, gate_attempt_id=attempt.id,
|
||||
).one()
|
||||
assert result.get('skipped') is False
|
||||
assert captured_payload['mode'] == 'retry_rpa'
|
||||
assert attempt.status == 'succeeded'
|
||||
assert gate.status == 'passed'
|
||||
assert preparation.status == 'succeeded'
|
||||
|
||||
Reference in new issue
Block a user