Files
odysseus/tests/test_editor_psd_js.py
T
pewdiepie-archdaemonandClaude Opus 5.5 5fac693c1c feat(photo-editor): Ajax Image Editor client (Photoshop-parity tools)
Photoshop-parity editor client: layers, selection/masking, brushes,
smart filters, LUT import, Quick Edit, mobile gestures, workspaces,
batch operations, and the service-worker versioning (v978->v1006).

Source: vendor/photocraft (ad1cff44) photo-editor client files, merged
onto upstream/dev (a8c147b2). Conflict resolution documented in
pr_work/A_conflicts.md; editor files taken from vendor/photocraft
(upstream's editor is an earlier snapshot of the same feature).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 11:57:35 +00:00

40 lines
994 B
Python

from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
def read(rel):
return (ROOT / rel).read_text(encoding="utf-8")
PSD = read("static/js/editor/psd.js")
EXPORT = read("static/js/editor/export-dialog.js")
IMPORT = read("static/js/editor/wire-import.js")
SW = read("static/sw.js")
def test_psd_module_exports():
assert "export function exportPsd(" in PSD
assert "export function parsePsd(" in PSD
assert "export function packBits(" in PSD
assert "export function unpackBits(" in PSD
assert "8BPS" in PSD
assert "const psb = version === 2;" in PSD
def test_export_dialog_offers_psd():
assert "from './psd.js';" in EXPORT
assert "exportPsd(" in EXPORT
assert "psd:" in EXPORT
assert 'data-format="psd"' in EXPORT
def test_import_handles_psd():
assert "from './psd.js';" in IMPORT
assert "parsePsd(" in IMPORT
assert ".psd" in IMPORT
def test_psd_module_is_precached():
assert "/static/js/editor/psd.js" in SW