feat: edit photos in conversation replies (Closes #947)
This commit is contained in:
1 parent
6270253c24
commit
0d5fa13d65
7 files changed
+82
-6
No files matched your search
@@ -151,3 +151,35 @@ def test_mobile_editor_dialog_is_accessible_touch_sized_and_available_offline():
|
||||
assert "min-height:44px" in css
|
||||
assert "max-width:100%" in css
|
||||
assert "overflow-x:hidden" in css
|
||||
|
||||
|
||||
def test_mobile_conversation_photo_editor_is_available_in_every_composer():
|
||||
html = INDEX.read_text()
|
||||
dashboard = (ROOT / "frontend" / "dashboard.js").read_text()
|
||||
css = CSS.read_text()
|
||||
|
||||
composers = (
|
||||
("issue-attachment", "issueAttachmentController"),
|
||||
("pull-attachment", "pullAttachmentController"),
|
||||
("update-reply-attachment", "updateReplyAttachmentController"),
|
||||
)
|
||||
for attachment_id, controller in composers:
|
||||
assert f'id="edit-{attachment_id}" type="button">Edit photo</button>' in html
|
||||
mount = dashboard.split(
|
||||
f"const {controller} = issueAttachment.mount({{", 1
|
||||
)[1].split("\n });", 1)[0]
|
||||
assert f"edit: qs('#edit-{attachment_id}')" in mount
|
||||
assert "dialog: qs('#issue-evidence-editor')" in mount
|
||||
assert "appliedMessage: 'Edited photo flattened and ready to send.'" in mount
|
||||
|
||||
assert '<h3 id="issue-evidence-editor-heading">Edit selected photo</h3>' in html
|
||||
assert "Edits stay on this device until you send or file." in html
|
||||
assert (
|
||||
'</form>\n </section>\n</div>\n'
|
||||
'<section class="issue-evidence-editor" id="issue-evidence-editor"'
|
||||
) in html, "the shared editor must not be hidden inside the New issue sheet"
|
||||
assert (
|
||||
".conversation-evidence-review .issue-evidence-review-actions "
|
||||
"{ grid-template-columns:repeat(4,minmax(0,1fr)); }"
|
||||
) in css
|
||||
assert "@media (max-width:390px)" in css
|
||||
Reference in new issue
Block a user