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

32 lines
1.1 KiB
Python

import re
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
CSS = (ROOT / "static/css/13-image-editor.css").read_text(encoding="utf-8")
SW = (ROOT / "static/sw.js").read_text(encoding="utf-8")
def test_tab_undock_glyph_is_hover_and_keyboard_only():
# The per-tab undock glyph must not persist on a merely-clicked (focused) tab.
assert ".ge-dock-tab:focus-visible ~ .ge-dock-tab-pop" in CSS
assert ":focus-within .ge-dock-tab-pop" not in CSS
def test_group_undock_has_divider_and_margin():
start = CSS.index(".ge-dock-detach {")
block = CSS[start : start + 400]
assert "margin-left: 2px;" in block
assert "border-left: 1px solid" in block
def test_docked_history_has_no_open_in_window_button():
panels = (ROOT / "static/js/editor/panels/studio-panels.js").read_text(encoding="utf-8")
assert "ge-history-popout" not in panels
assert "Open in window" not in panels
def test_sw_cache_name_versions():
m = re.search(r"CACHE_NAME = '([^']+)'", SW)
assert m is not None
assert re.fullmatch(r"odysseus-v\d+-pr40-editor-precache", m.group(1))