更新
This commit is contained in:
@@ -1335,6 +1335,31 @@ def test_patient_report_dialog_uses_one_scroll_owner_and_wrapped_risk_flow(
|
||||
application.processEvents()
|
||||
|
||||
|
||||
def test_reception_report_displays_recorded_sources(application: QApplication) -> None:
|
||||
commit = "270e94e637c4249dc411e54ac6715f21247de3cb"
|
||||
payload = _snapshot("qwen", 2, "2026-10-08 15:00:00")
|
||||
payload.update({
|
||||
"source_diagnosis_ids": [501],
|
||||
"source_summary": {"diagnosis_count": 1, "prescription_count": 2},
|
||||
"knowledge_source": {
|
||||
"url": f"https://github.com/coinweth/nihaixia-skill/blob/{commit}/SKILL.md",
|
||||
"commit": commit,
|
||||
"sections": ["六经速查表"],
|
||||
},
|
||||
})
|
||||
dialog = _ReceptionAiAnalysisDialog({"qwen": [payload]})
|
||||
assert "#501" in dialog.source_label.text()
|
||||
assert "历史处方 2 条" in dialog.source_label.text()
|
||||
assert "六经速查表" in dialog.source_label.text()
|
||||
|
||||
page = ReceptionPage(object(), PermissionSet([]))
|
||||
page._render_ai_analysis_payload(payload, "qwen")
|
||||
assert "报告出处" in page.ai_source_label.text()
|
||||
assert "#501" in page.ai_source_label.text()
|
||||
dialog.close()
|
||||
page.close()
|
||||
|
||||
|
||||
def test_reception_ai_card_is_compact_preview_without_nested_scroll(
|
||||
application: QApplication,
|
||||
) -> None:
|
||||
|
||||
Reference in New Issue
Block a user