清理废弃的shipping xfa ocr automark相关代码和job配置 新增收料报表管理的前端页面、路由和侧边栏入口 新增后端收料报表配置接口、数据库模型和RPA脚本 优化发货通知流程的重试策略,将shipping相关job默认不自动重试 移除废弃的库存源确认相关逻辑,更新流程门禁规则 重构订单模板的值适配器模块,新增坐标OCR值适配器 清理前端shipping菜单和action的废弃选项 更新相关文档和测试用例,调整.gitignore忽略规则
40 lines
1.5 KiB
Python
40 lines
1.5 KiB
Python
"""
|
|
backend/tests/test_shipping_chat_action_handlers.py
|
|
|
|
覆盖货代 Chat Action Handler 与业务 workflow 的集成(不依赖 Dify)。
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from app.services.chat.action_registry import ensure_handlers_loaded, list_action_types
|
|
|
|
|
|
def test_legacy_fulfillment_chat_actions_are_not_registered():
|
|
"""正式 OT 的履约写只能经 Gate API,旧 Chat Turn 不得再有可解析处理器。"""
|
|
ensure_handlers_loaded()
|
|
|
|
action_types = set(list_action_types())
|
|
assert {
|
|
"shipping.freeze_order",
|
|
"shipping.generate_excel",
|
|
"shipping.retry_upload",
|
|
"shipping.match_inventory",
|
|
"shipping.confirm_inventory_source",
|
|
"shipping.submit_decision",
|
|
"shipping.mark_manual_uploaded",
|
|
}.isdisjoint(action_types)
|
|
|
|
|
|
def test_legacy_workspace_fulfillment_routes_are_not_registered(app):
|
|
"""正式 OT 只能通过 Gate API 写入,旧直写与转发路由不得回归。"""
|
|
routes = {str(rule.rule) for rule in app.url_map.iter_rules()}
|
|
|
|
assert {
|
|
'/api/workspace/shipping-tasks/<task_no>/confirm-inventory-source',
|
|
'/api/workspace/shipping-tasks/<task_no>/submit-decision',
|
|
'/api/workspace/shipping-tasks/<task_no>/freeze-order',
|
|
'/api/workspace/shipping-tasks/<task_no>/match-inventory',
|
|
'/api/workspace/shipping-tasks/<task_no>/generate-excel',
|
|
'/api/workspace/shipping-tasks/<task_no>/retry-upload',
|
|
}.isdisjoint(routes)
|