Files
odysseus/tests/test_editor_float_dock_icon.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

34 lines
1.0 KiB
Python

import re
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
def _read(rel):
return (ROOT / rel).read_text(encoding="utf-8")
def test_float_dock_svg_is_16px():
body = _read("static/js/editor/build/dock.js")
assert '<svg width="16" height="16"' in body
assert '<svg width="12" height="12"' not in body
# Two float-dock buttons (panel + group) plus the collapse/more head
# buttons, all on the shared 16px glyph.
assert body.count('<svg width="16" height="16"') >= 2
def test_float_dock_button_css_is_larger():
css = _read("static/css/13-image-editor.css")
assert ".ge-float-dock {" in css
assert "width: 28px;" in css
assert "height: 26px;" in css
assert "padding: 0;" in css
assert ".ge-float-dock svg { width: 16px; height: 16px; flex: 0 0 auto; }" in css
def test_sw_cache_name_version_agnostic():
body = _read("static/sw.js")
m = re.search(r"const CACHE_NAME = '([^']+)';", body)
assert m
assert re.fullmatch(r"odysseus-v\d+-pr40-editor-precache", m.group(1))