mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-16 11:52:25 +02:00
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>
30 lines
1.1 KiB
Python
30 lines
1.1 KiB
Python
import re
|
|
import pathlib
|
|
|
|
REPO = pathlib.Path(__file__).resolve().parent.parent
|
|
EDITOR_JS = (REPO / "static/js/galleryEditor.js").read_text(encoding="utf-8")
|
|
CSS = (REPO / "static/css/13-image-editor.css").read_text(encoding="utf-8")
|
|
SW = (REPO / "static/sw.js").read_text(encoding="utf-8")
|
|
|
|
|
|
def test_mobile_footer_sits_flush_on_the_sheet():
|
|
# The floating phone footer docks flush to the sheet top (footer bottom ==
|
|
# sheet top, no 6px canvas gap that the overlapping shadows greyed into a
|
|
# fake scrollbar).
|
|
assert "Math.round(vh - r.top)" in EDITOR_JS
|
|
assert "Math.round(vh - r.top + 6)" not in EDITOR_JS
|
|
|
|
|
|
def test_phone_menu_bar_compaction_rules_present():
|
|
assert ".ge-topbar-left .ge-stacked-btn {" in CSS
|
|
assert "font-size: 11px;" in CSS
|
|
assert "padding: 0 6px !important;" in CSS
|
|
assert ".ge-topbar.ge-topbar-compact #ge-draft-status {" in CSS
|
|
assert "display: none;" in CSS
|
|
|
|
|
|
def test_sw_cache_name_is_version_agnostic_pattern():
|
|
m = re.search(r"CACHE_NAME\s*=\s*'([^']+)'", SW)
|
|
assert m is not None
|
|
assert re.fullmatch(r"odysseus-v\d+-pr40-editor-precache", m.group(1))
|