feat: 增强处理历史导出记录摘要展示
This commit is contained in:
@@ -451,3 +451,51 @@ def test_audit_detail_page_shows_export_summary_and_notification_receipt(client,
|
||||
assert "风险项未清零" in content
|
||||
assert "通知回执" in content
|
||||
assert "msg-9" in content
|
||||
|
||||
|
||||
def test_audit_detail_page_shows_export_file_name_and_mode(client, db):
|
||||
Conversation.objects.create(
|
||||
conversation_id="conv-003",
|
||||
title="产品C",
|
||||
product_name="产品C",
|
||||
batch_id="SUB-20260604-003",
|
||||
task_status="success",
|
||||
node_results=[
|
||||
{"label": "Word 回填导出", "status": "待复核"},
|
||||
{"label": "飞书通知", "status": "已完成"},
|
||||
],
|
||||
)
|
||||
log = create_audit_log(
|
||||
"document_review",
|
||||
"Word 回填导出",
|
||||
"导出任务",
|
||||
AgentResult(
|
||||
answer="已生成导出草稿",
|
||||
status="success",
|
||||
structured_output={
|
||||
"export_status": "draft_only",
|
||||
"template_name": "注册证导出模板",
|
||||
"template_version": "V1.0",
|
||||
"download_url": "/media/exports/20260604/SUB-20260604-003-draft.docx",
|
||||
"output_file": {
|
||||
"file_name": "SUB-20260604-003-draft.docx",
|
||||
"relative_path": "exports/20260604/SUB-20260604-003-draft.docx",
|
||||
"export_mode": "draft",
|
||||
},
|
||||
},
|
||||
),
|
||||
batch_id="SUB-20260604-003",
|
||||
conversation_id="conv-003",
|
||||
product_name="产品C",
|
||||
)
|
||||
|
||||
response = client.get(reverse("audit:detail", args=[log.id]))
|
||||
|
||||
content = response.content.decode("utf-8")
|
||||
assert response.status_code == 200
|
||||
assert "输出文件名" in content
|
||||
assert "SUB-20260604-003-draft.docx" in content
|
||||
assert "导出模式" in content
|
||||
assert "draft" in content
|
||||
assert "模板版本" in content
|
||||
assert "V1.0" in content
|
||||
|
||||
Reference in New Issue
Block a user