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>
54 lines
1.4 KiB
Python
54 lines
1.4 KiB
Python
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
|
|
|
|
def read(rel):
|
|
return (ROOT / rel).read_text(encoding="utf-8")
|
|
|
|
|
|
WORKSPACES = read("static/js/editor/workspaces.js")
|
|
TOPBAR = read("static/js/editor/build/topbar.js")
|
|
WIRE = read("static/js/editor/wire-extra-menus.js")
|
|
GALLERY = read("static/js/galleryEditor.js")
|
|
SW = read("static/sw.js")
|
|
|
|
|
|
def test_workspaces_module_shape():
|
|
assert "export const WORKSPACES" in WORKSPACES
|
|
assert "export function applyWorkspace(" in WORKSPACES
|
|
for name in ("essentials", "photography", "painting", "graphic"):
|
|
assert name in WORKSPACES
|
|
assert "localStorage" in WORKSPACES
|
|
|
|
|
|
def test_window_menu_exposes_workspaces_and_panels():
|
|
for action in (
|
|
"workspace-essentials",
|
|
"workspace-photography",
|
|
"workspace-painting",
|
|
"workspace-graphic",
|
|
"swatches",
|
|
"gradients",
|
|
"channels",
|
|
"histogram",
|
|
"info",
|
|
"navigator",
|
|
):
|
|
assert f'data-window-action="{action}"' in TOPBAR
|
|
|
|
|
|
def test_wire_extra_menus_dispatches_workspaces():
|
|
assert "workspace" in WIRE
|
|
assert "action.startsWith('workspace-')" in WIRE
|
|
|
|
|
|
def test_gallery_wires_workspaces():
|
|
assert "from './editor/workspaces.js';" in GALLERY
|
|
assert "_applyWorkspace(" in GALLERY
|
|
assert "workspace: (name) =>" in GALLERY
|
|
|
|
|
|
def test_workspaces_module_is_precached():
|
|
assert "/static/js/editor/workspaces.js" in SW
|