52 lines
2.4 KiB
Python
52 lines
2.4 KiB
Python
"""PLAN 398-1 sub7 — 교점 옮기면 좌측 패널 열림(요구 248) · 513-2 로 뒤집음.
|
|
|
|
못박는 것
|
|
- 513-2 — 고름은 내용만 · 좌측 패널 · 「구조물 배치」 카드 열림 · 닫힘은 사용자가 둔 그대로
|
|
(옛 onReveal · `isUserPick` 펴기 걷음 · 우클릭 추가도 카드 안 폄).
|
|
- 499-1 그대로 — 좌측 패널은 안 엶(`revealLeft` · `setOptionsOpen(` 없음) ·
|
|
패널을 열 때 고른 줄 · 강조 상자로 한 번 밂 · B06 평면 겹침 기준 = main 전체.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
HERE = Path(__file__).resolve().parent
|
|
ROOT = HERE.parents[1]
|
|
|
|
|
|
def _read(rel: str) -> str:
|
|
return (ROOT / rel).read_text(encoding="utf-8")
|
|
|
|
|
|
def test_513_2_고름은_카드_열림_안_건드림():
|
|
shared = _read("A00_Common/design/design_shared.ts")
|
|
assert "onReveal" not in shared and "isUserPick" not in shared
|
|
for rel in ("A00_Common/design/design_shared.ts", "A00_Common/design/design_page.ts"):
|
|
assert "revealLeft" not in _read(rel) and "setOptionsOpen(" not in _read(rel) # 499-1
|
|
panel = _read("B05_Profile/B05_Profile_UI_Structures_Panel.ts")
|
|
assert "onReveal" not in panel
|
|
assert 'root.classList.remove("is-collapsed")' not in panel
|
|
assert not (ROOT / "A00_Common/design/design_user_pick.ts").exists()
|
|
|
|
|
|
def test_열_때_고른_줄로_밂():
|
|
page = _read("A00_Common/design/design_page.ts")
|
|
assert "onOptionsOpenChange: (isOpen) => isOpen && scrollToPick(shared.structures)" in page
|
|
shared = _read("A00_Common/design/design_shared.ts")
|
|
body = shared[shared.index("export function scrollToPick(") :]
|
|
body = body[: body.index("\n}\n")]
|
|
assert 'listRoot.querySelector(".is-selected")' in body
|
|
assert 'root.querySelector("fieldset.is-active")' in body
|
|
layout = _read("ui_template/ui_template_workflow_layout.ts")
|
|
assert "options.onOptionsOpenChange?.(isOpen);" in layout
|
|
|
|
|
|
def test_B06_평면_겹침_기준_main_전체():
|
|
css = _read("A00_Common/design/design_page.css")
|
|
rule = css[css.index('.design-page__main[data-view="cross"] > .design-page__center {') :]
|
|
assert "position: static;" in rule[: rule.index("}")]
|
|
peek = css[css.index(".design-plan-peek {") :]
|
|
z = int(peek[peek.index("z-index:") + 8 : peek.index(";", peek.index("z-index:"))])
|
|
assert 3 < z < 199 # 종단 판(3) 위 · 서랍 덮개(199) 아래
|