Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QfHKQs7J3hQELKMWQMUJEy
69 lines
3.0 KiB
Python
69 lines
3.0 KiB
Python
"""258 · 425 — B06 위 평면 겹침 패널.
|
|
|
|
종단 보기 평면 노드를 옮겨 붙임(둘째 캔버스 없음) · 닫을 때 · 횡단 숨김 때 제자리 · 손잡이 =
|
|
공용 bottom 위로 접힘 · z 4 · 높이 45 % · 편집 도구 감춤 · 가운데 버튼 팬 · 휠만(편집 누름 막음) ·
|
|
평면 방향키는 B05 평면 안에서만. 배선은 글로 봄.
|
|
./venv/Scripts/python.exe -m pytest resources/tester/test_258_b06_plan_peek.py -q
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
DESIGN = ROOT / "A00_Common" / "design"
|
|
PEEK = (DESIGN / "design_plan_peek.ts").read_text(encoding="utf-8")
|
|
CROSS = (DESIGN / "design_view_cross.ts").read_text(encoding="utf-8")
|
|
CSS = (DESIGN / "design_page.css").read_text(encoding="utf-8")
|
|
B05 = ROOT / "B05_Profile"
|
|
|
|
|
|
def _rule(selector: str) -> str:
|
|
body = CSS[CSS.index(selector + " {") :]
|
|
return body[: body.index("}")]
|
|
|
|
|
|
def test_횡단_보기가_패널을_세움() -> None:
|
|
assert 'import { mountPlanPeek } from "./design_plan_peek";' in CROSS
|
|
assert CROSS.index("center.append(mainArea);") < CROSS.index(
|
|
"mountPlanPeek(center, host, shared);"
|
|
)
|
|
|
|
|
|
def test_평면_노드를_옮기고_제자리로() -> None:
|
|
assert 'createWorkflowPanelHandle("bottom", "up", "평면")' in PEEK
|
|
assert 'await shared.ensureView("profile");' in PEEK # B06 바로 열기 = 종단 보기 숨긴 채
|
|
assert '".b05-route__main > .b05-routeedit"' in PEEK
|
|
assert "plan.replaceWith(home);" in PEEK and "body.append(plan);" in PEEK
|
|
assert "home.replaceWith(plan);" in PEEK # 닫기 = 자리표 자리로
|
|
assert "host.onHide(close);" in PEEK # 횡단 숨김(B05 로 감) = 제자리
|
|
assert 'createElement("canvas")' not in PEEK
|
|
assert len(PEEK.splitlines()) <= 700
|
|
|
|
|
|
def test_편집_누름은_막고_팬_휠은_통과() -> None:
|
|
down = PEEK[PEEK.index('"pointerdown"') :]
|
|
down = down[: down.index("true,")]
|
|
assert "if (event.button !== 1) event.stopPropagation();" in down
|
|
assert 'for (const type of ["dblclick", "contextmenu"])' in PEEK
|
|
assert '"wheel"' not in PEEK # 휠 확대는 캔버스 그대로
|
|
|
|
|
|
def test_겹침_자리와_감춤() -> None:
|
|
root = _rule(".design-plan-peek")
|
|
assert "position: absolute;" in root and "z-index: 4;" in root
|
|
assert "pointer-events: none;" in root # 닫힌 동안 카드 누름 통과
|
|
assert "height: 45%;" in _rule(".design-plan-peek.is-open")
|
|
hidden = CSS[CSS.index(".design-plan-peek .b05-routeedit__tools,") :]
|
|
hidden = hidden[: hidden.index("}")]
|
|
for part in ("__tools", "__info", "__measure", "__side-wrap", "b05-contourlock"):
|
|
assert part in hidden
|
|
assert "display: none;" in hidden
|
|
|
|
|
|
def test_평면_방향키는_B05_평면_안만() -> None:
|
|
for name in ("B05_Profile_UI_RouteEdit_Keys.ts", "B05_Profile_UI_RouteEdit_StructureMarks.ts"):
|
|
text = (B05 / name).read_text(encoding="utf-8")
|
|
assert 'lastPointerWithin(".b05-route__main .b05-routeedit")' in text
|
|
assert 'lastPointerWithin(".b05-routeedit")' not in text
|