mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-13 02:12:21 +02:00
Preserve preview harness, editor, email and task improvements
Snapshot current maintainer-preview application changes and regression fixtures for integration into lab. Excludes local runtime data, evaluation outputs and source backups. Focused Python regression selection: 140 passed; full suite not certified.
This commit is contained in:
@@ -42,26 +42,21 @@ def test_doc_update_refreshes_preview_instead_of_hidden_editor_animation():
|
||||
exit_preview = "if (markdownPreviewWasVisible) _setMarkdownPreviewActive(false, { remember: false });"
|
||||
diff = "enterDiffMode(oldContent, newContent);"
|
||||
refresh = "markdownPreviewWasVisible && _refreshMarkdownPreviewIfVisible(docId, newContent)"
|
||||
animate = "_animateDocEdit(textarea, newContent);"
|
||||
saved_content = "textarea.value = newContent;"
|
||||
|
||||
assert visible in body
|
||||
assert exit_preview in body
|
||||
assert diff in body
|
||||
assert body.index(exit_preview) < body.index(diff)
|
||||
assert exit_preview not in body
|
||||
assert diff not in body
|
||||
assert refresh in body
|
||||
assert body.index(refresh) < body.index(animate)
|
||||
assert saved_content in body
|
||||
assert "_animateDocEdit(textarea, newContent);" not in body
|
||||
assert "_refreshMarkdownPreviewIfVisible(docId, newContent);" in body
|
||||
|
||||
|
||||
def test_doc_update_shows_a_plain_text_diff_before_refreshing_rich_text():
|
||||
def test_doc_update_shows_saved_rich_text_without_a_transient_diff():
|
||||
body = _function_body("handleDocUpdate")
|
||||
|
||||
assert "const isRichTextUpdate = _isRichTextLang(docLang);" in body
|
||||
assert "if (isRichTextUpdate && updatedDocForRichText)" in body
|
||||
assert "_animateRichTextEdit(oldContent, newContent, updatedDocForRichText);" in body
|
||||
|
||||
rich_diff = _function_body("_animateRichTextEdit")
|
||||
assert "_richTextContentToPlain(oldContent)" in rich_diff
|
||||
assert "_richTextContentToPlain(newContent)" in rich_diff
|
||||
assert "lineDiff(oldText, newText)" in rich_diff
|
||||
assert "_showRichTextEditor(updatedDoc);" in rich_diff
|
||||
assert "_showRichTextEditor(updatedDocForRichText);" in body
|
||||
assert "_animateRichTextEdit" not in body
|
||||
|
||||
Reference in New Issue
Block a user