"""횡단에서 고르기 · 목록에서 고르기 좌측 패널 같은 글 (PLAN 54-29). 짝: `B06_Section/B06_Section_UI_Adjust_Dock.ts`(배관 칸 = 이름표 그대로 · 옵션 · 읽기 · 유출 단 수 줄 안 받음) · `B06_Section/B06_Section_UI_Cross_Structure_Panel.ts`(배관 유입 벽 단 수 줄 = 선 단이 있을 때만) · `B06_Section/B06_Section_UI_Page_Structures_Panel.ts`(폼을 다시 그린 뒤 강조 다시). 화면 확인은 ORCA(목록 · 횡단 innerText · 칸 수 · 값 같음 · 강조 상자 하나만 다름). """ from __future__ import annotations import os import re HERE = os.path.dirname(__file__) def _src(rel: str) -> str: with open(os.path.join(HERE, "..", "..", rel), encoding="utf-8") as f: return f.read() def test_배관_칸은_옵션_읽기_줄을_안_받음() -> None: dock = _src("B06_Section/B06_Section_UI_Adjust_Dock.ts") inlet = re.search(r"const PIPE_INLET_ROWS = \[(.*?)\]", dock, re.S) assert inlet assert "struct--options" not in inlet.group(1) assert "struct--readout" not in inlet.group(1) assert 'const PIPE_OUTLET_ROWS = ".b06-structure-panel__struct--basin-size";' in dock def test_배관_칸_이름표는_그대로() -> None: dock = _src("B06_Section/B06_Section_UI_Adjust_Dock.ts") assert 'setGroupLabel(group, pipe ? "" : (panelRoot.dataset.panelTitle ?? ""));' in dock def test_배관_유입_단_수_줄은_선_단이_있을_때만() -> None: panel = _src("B06_Section/B06_Section_UI_Cross_Structure_Panel.ts") assert "!isBasin && !deps.hiddenPipe()" in panel assert "(pipeInlet && tiers.count === 0)" in panel def test_폼을_다시_그리면_강조_다시() -> None: page = _src("B06_Section/B06_Section_UI_Page_Structures_Panel.ts") assert "recount: () => (section.facility.recount(), refreshAdjustSlots())" in page sync = page[page.index("const syncInletStructure") :] assert sync.index("refreshAdjustSlots()") < sync.index("};")