Files
Aislo/resources/tester/test_258_b06_plan_peek.py
T
eomsangdonandClaude Opus 5.5 eac20bd93b fix(436 B06 평면 패널): 처음 높이 바닥 160 px · 높이 상한 = 패널 % 기준 칸(offsetParent) (433-8)
- 종단 판 펼친 B06 = 칸 225 px 라 32 % 가 72 px — max(32%, 160px)
- 끌기 상한이 높이 0 인 횡단 center 를 재어 늘 120 px 로 눌림 — offsetParent 높이 − 48 px
- PLAN 436-1 검증완료

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QfHKQs7J3hQELKMWQMUJEy
2026-10-18 17:20:38 +09:00

94 lines
4.5 KiB
Python

"""258 · 425 · 436 — B06 위 평면 겹침 패널.
종단 보기 평면 노드를 옮겨 붙임(둘째 캔버스 없음) · 닫을 때 · 횡단 숨김 때 제자리 · 손잡이 =
공용 bottom 위로 접힘 · z 4 · 처음 높이 32 % · 아래 끝 끌어 높이(화면 기억) · 단추 줄 · 안내 등 감춤 ·
조작(끌기 · 끼우기 · 지우기 · 방향키 · 휠 · 팬)은 B05 평면 그대로 · 처음 보일 때 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_조작은_B05_평면_그대로() -> None:
# 패널이 누름 · 휠을 가로채지 않음 — 캔버스에 붙은 B05 처리기가 그대로 받음
for event in ('"pointerdown"', '"dblclick"', '"contextmenu"', '"wheel"', '"keydown"'):
assert event not in PEEK
assert "stopPropagation" not in PEEK
def test_높이_끌기와_기억() -> None:
assert "createPanelResizer({" in PEEK
assert 'cssVar: "--design-plan-peek-height",' in PEEK and "direction: 1," in PEEK
assert 'storageKey: stateKey("plan-peek-height")' in PEEK
assert "max: () => (root.offsetParent?.clientHeight ?? 0) - 48," in PEEK
assert "resizer.restore();" in PEEK[PEEK.index("const open = async") :]
state = (ROOT / "A00_Common" / "b_page_state.ts").read_text(encoding="utf-8")
assert '"plan-peek-height": { bucket: "pref", scope: "global" },' in state
handle = _rule(".design-plan-peek > .ui-resizer")
assert "bottom: -3px;" in handle and "display: none;" in handle
assert "display: block;" in _rule(".design-plan-peek.is-open > .ui-resizer")
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: var(--design-plan-peek-height, max(32%, 160px));" 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_평면_방향키는_마지막_누름이_평면_안() -> 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-routeedit")' in text # 겹침 평면도(436)
assert ".b05-route__main .b05-routeedit" not in text
def test_처음_보일_때_B05_칸_크기로_셈() -> None:
editor = (B05 / "B05_Profile_UI_RouteEdit.ts").read_text(encoding="utf-8")
body = editor[editor.index("function openView(): void {") :]
body = body[: body.index("\n }")]
assert 'const atHome = overlay.closest(".b05-route__main") !== null;' in body
assert 'atHome ? null : overlay.closest(".design-page__center")' in body
assert "openingView(projectId, meta, home," in body
assert "restoreSavedView(meta, view, captureView(meta, opening.view, 0))" in body