mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-16 20:02:20 +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>
43 lines
1.4 KiB
Python
43 lines
1.4 KiB
Python
from pathlib import Path
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
SRC = ROOT / "static/js/editor/build/options-bar.js"
|
|
GALLERY = ROOT / "static/js/galleryEditor.js"
|
|
CSS = ROOT / "static/css/13-image-editor.css"
|
|
|
|
|
|
def test_options_bar_module_shape():
|
|
src = SRC.read_text(encoding="utf-8")
|
|
assert "export function buildOptionsBar" in src
|
|
assert "export function renderOptionsBar" in src
|
|
assert "export function syncOptionsBar" in src
|
|
# Delegates to the authoritative right-panel controls (no duplicate state).
|
|
for selector in (
|
|
".ge-size-slider",
|
|
"#ge-brush-opacity",
|
|
"#ge-brush-flow",
|
|
"#ge-eraser-flow",
|
|
"#ge-clone-opacity",
|
|
"#ge-lasso-feather",
|
|
"#ge-wand-feather",
|
|
"#ge-gradient-type",
|
|
"#ge-gradient-opacity",
|
|
):
|
|
assert selector in src, selector
|
|
# Selection modes reuse the existing wand-mode buttons rather than re-implementing.
|
|
assert "data-wand-mode=" in src
|
|
|
|
|
|
def test_options_bar_is_hidden_on_phones():
|
|
css = CSS.read_text(encoding="utf-8")
|
|
assert ".ge-options-bar" in css
|
|
assert ".ge-options-empty .ge-options-sep" in css
|
|
|
|
|
|
def test_gallery_wires_options_bar():
|
|
src = GALLERY.read_text(encoding="utf-8")
|
|
assert "buildOptionsBar as _buildOptionsBar" in src
|
|
assert "_buildOptionsBar()" in src
|
|
assert "_renderOptionsBar(optionsBar, state.tool)" in src
|