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>
30 lines
1.1 KiB
Python
30 lines
1.1 KiB
Python
import re
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
ADJ = (ROOT / "static/js/editor/fx/adj-popup.js").read_text(encoding="utf-8")
|
|
SW = (ROOT / "static/sw.js").read_text(encoding="utf-8")
|
|
|
|
|
|
def test_adjustment_popup_head_uses_a_close_button():
|
|
# The head control is an explicit close (x), not a minimise affordance that
|
|
# did not behave like a minimise.
|
|
assert '<button class="ge-adj-close" type="button" title="Close" aria-label="Close">×</button>' in ADJ
|
|
|
|
|
|
def test_head_no_longer_renders_a_minimise_button():
|
|
assert 'class="ge-adj-min"' not in ADJ
|
|
assert 'title="Minimise"' not in ADJ
|
|
assert "−" not in ADJ
|
|
|
|
|
|
def test_close_button_is_wired_to_close_adj_popup():
|
|
assert "pop.querySelector('.ge-adj-close')?.addEventListener('click', closeAdjPopup);" in ADJ
|
|
assert "pop.querySelector('.ge-adj-min')" not in ADJ
|
|
|
|
|
|
def test_sw_cache_name_is_version_agnostic():
|
|
m = re.search(r"CACHE_NAME = '(odysseus-v\d+-pr40-editor-precache)'", SW)
|
|
assert m, "sw.js CACHE_NAME not found"
|
|
assert re.fullmatch(r"odysseus-v\d+-pr40-editor-precache", m.group(1))
|