feat: 对齐导出节点口径与下载信息展示
This commit is contained in:
@@ -373,6 +373,34 @@ def test_chat_page_shows_upload_entry_and_dynamic_context_cards(client, db):
|
||||
assert "飞书通知 / 待处理" in content
|
||||
|
||||
|
||||
def test_chat_page_blocks_formal_export_when_word_export_node_is_blocked(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.latest_summary = {
|
||||
"structured_output": {
|
||||
"download_url": "/downloads/export.docx",
|
||||
}
|
||||
}
|
||||
conversation.save(update_fields=["node_results", "latest_summary", "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 "/downloads/export.docx" in content
|
||||
|
||||
|
||||
def test_chat_upload_keeps_existing_conversation_binding_and_adds_documents(client, db):
|
||||
batch, conversation = _create_conversation_with_batch()
|
||||
existing_document = UploadedDocument.objects.create(
|
||||
|
||||
Reference in New Issue
Block a user