mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-09 08:22:19 +02:00
Consolidate Odysseus agent harness and tool contracts
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
|
||||
|
||||
def test_richtext_toolbar_preserves_selection_before_formatting():
|
||||
source = (ROOT / "static/js/document.js").read_text(encoding="utf-8")
|
||||
|
||||
assert "let _savedFormatTextareaSelection = null;" in source
|
||||
assert "let _savedFormatRichRange = null;" in source
|
||||
assert "toolbar.addEventListener('pointerdown', (e) =>" in source
|
||||
assert "_saveFormatSelection(e);" in source
|
||||
assert "textarea.selectionStart !== textarea.selectionEnd" in source
|
||||
assert "ta.selectionStart = _savedFormatTextareaSelection.start;" in source
|
||||
assert "const _selection = window.getSelection?.();" in source
|
||||
assert "_richFormatRange = _range.cloneRange();" in source
|
||||
assert "_selection.addRange(_richFormatRange.cloneRange());" in source
|
||||
assert "collapse the browser range before execCommand runs" in source
|
||||
Reference in New Issue
Block a user