This commit is contained in:
Your Name
2026-08-12 14:48:57 +08:00
parent bc9ad1d3cd
commit 6d9fe1bbf8
403 changed files with 1790 additions and 1573 deletions
+8 -2
View File
@@ -69,8 +69,9 @@ def test_note_attachment_preview_type_is_extension_aware(path: str, expected: bo
assert _is_image_attachment(path) is expected
def test_note_attachments_offer_image_preview_and_file_open(
def test_note_attachments_expand_images_and_keep_file_open(
application: QApplication,
immediate_async: None,
) -> None:
page = ReceptionPage(DemoDoctorRepository(), PermissionSet([]))
page._render_notes(
@@ -87,8 +88,13 @@ def test_note_attachments_offer_image_preview_and_file_open(
]
)
previews = page.notes_container.findChildren(
QPushButton, "NoteAttachmentPreview"
)
assert len(previews) == 2
assert all(button.text() == "" for button in previews)
assert all(not button.icon().isNull() for button in previews)
labels = [button.text() for button in page.notes_container.findChildren(QPushButton)]
assert labels.count("预览") == 2
assert labels.count("打开") == 1
page.close()
application.processEvents()