更新
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user