fix ui composer

This commit is contained in:
javad committed 2026-09-17 11:08:16 +03:30
1 parent a26ae28189
commit 33930e972c
8 files changed
+73 -16

No files matched your search

+11
View File
@@ -452,6 +452,7 @@ def test_ticket_workspace_uses_mobile_viewport_and_keyboard_safe_layout_contract
ui_script=Path("static/js/ui.js").read_text(encoding="utf-8")
conversation_script=Path("static/js/conversation.js").read_text(encoding="utf-8")
magic_template=Path("templates/tickets/customer_detail.html").read_text(encoding="utf-8")
staff_template=Path("templates/tickets/staff_detail.html").read_text(encoding="utf-8")
assert "interactive-widget=resizes-content" in base
for feature in ("100svh","--visual-viewport-height","overscroll-behavior:none","display-mode:standalone"):
assert feature in source_css
@@ -463,6 +464,16 @@ def test_ticket_workspace_uses_mobile_viewport_and_keyboard_safe_layout_contract
assert "focus({preventScroll:true})" in conversation_script
for feature in ("is-keyboard-active","ensureInputVisible","stableViewportHeight-height>120","data-keyboard-open"):
assert feature in conversation_script or feature in source_css
assert "input.setAttribute('rows','1')" in conversation_script
assert "Math.min(Math.max(contentHeight,48),maxHeight)" in conversation_script
assert "keyboardClosed" in conversation_script and "setComposerOpen(false,false)" in conversation_script
assert "لطفاً توضیحات خود را کامل، دقیق و یک‌جا بنویسید" not in magic_template
for template in (magic_template,staff_template):
assert 'class="composer-input-row"' in template
assert template.count('class="media-picker-icon"')==2
assert 'data-toggle-recorder' in template and 'data-gallery-input' in template and 'data-document-input' in template
for feature in (".composer-input-row","grid-template-columns:repeat(2,minmax(0,1fr))",".ticket-workspace .composer-close{display:none!important}"):
assert feature in source_css
assert '<footer class="ticket-detail-credit">{{ developer_credit }}</footer>' in magic_template
def test_frontend_runtime_libraries_are_local_and_versioned():