feat: 增强会话历史风险与绑定状态展示
This commit is contained in:
@@ -134,6 +134,29 @@ def test_chat_renders_three_column_workspace_and_node_results(client, db):
|
||||
assert "目录汇总 / 处理中" in content
|
||||
|
||||
|
||||
def test_chat_history_sidebar_shows_risk_status_update_time_and_batch_binding(client, db):
|
||||
batch, conversation = _create_conversation_with_batch()
|
||||
conversation.node_results = [
|
||||
{"label": "资料包导入", "status": "已完成"},
|
||||
{"label": "目录汇总", "status": "已完成"},
|
||||
{"label": "法规完整性检查", "status": "已完成"},
|
||||
{"label": "字段抽取", "status": "已完成"},
|
||||
{"label": "一致性核查", "status": "待复核"},
|
||||
{"label": "风险预警", "status": "已阻断"},
|
||||
{"label": "Word 回填导出", "status": "待复核"},
|
||||
{"label": "飞书通知", "status": "待处理"},
|
||||
]
|
||||
conversation.save(update_fields=["node_results", "updated_at"])
|
||||
|
||||
response = client.get(reverse("chat:detail", args=[conversation.conversation_id]))
|
||||
|
||||
content = response.content.decode("utf-8")
|
||||
assert response.status_code == 200
|
||||
assert "风险:高" in content
|
||||
assert "最近更新:" in content
|
||||
assert "已绑定资料包" in content
|
||||
|
||||
|
||||
def test_chat_execution_creates_notification_record_from_agent_result(client, db, monkeypatch):
|
||||
batch, conversation = _create_conversation_with_batch()
|
||||
UploadedDocument.objects.create(
|
||||
|
||||
Reference in New Issue
Block a user