- 폼이 상자를 새로 세울 때마다(단 수 · 유입 형식 · 벽 조작 · 저장 · 넘김) 고른 상자 강조 다시(specpaint 한 곳) · 54-29 의 두 군데 호출 대체 - 관 보호공(유입 · 유출) 상자 안 [연동] [경사] 반 폭 두 단추 — 옛 연동 제어 값(revet_link_detached · revet_follow_grade) 그대로 · 쓸 수 있을 때만 활성 · 경사 끄면 연동 잠김 · 누르면 횡단 그림 바로 - 상자 칸을 고치거나 고르면 그 벽을 고름(횡단에서 누른 것과 같은 길 · 카드 다시 그림) · 단 수 칸은 고른 단을 지킴 - 추가 흙막이 상자 = 사면안정 흙막이와 같은 칸(형태 · 길이 · 높이 · 전 · 후) · 구조 고르기 칸과 정의 이름 두 줄 뺌 · 저장 키 그대로 - 시험 54-29 · 54-27 · 52 명세 · 54-14 말풍선 기대값 맞춤 화면 확인(sub5_검증 12+18): 흙막이 1 강조 = 단 2→1 · 넘김 · 저장 뒤 유지 · 형태 고침 → 상자 · 벽 강조 · 경사 끔 → 13+0 벽 이동 · 두 줄 함께 · 목록 대 횡단 같은 글(칸 54) · 단 0 저장으로 되돌림 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BVPp2o6Mh2FZJr72yW3ofZ
71 lines
3.2 KiB
Python
71 lines
3.2 KiB
Python
"""횡단에서 고르기 · 목록에서 고르기 좌측 패널 같은 글 (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:
|
|
"""54-30 — 상자를 새로 세울 때마다(단 수 · 유입 형식 · 벽 조작 · 저장 · 넘김) 한 곳에서 강조를 다시 얹음."""
|
|
form = _src("A00_Common/design/design_structure_form.ts")
|
|
assert 'root.dispatchEvent?.(new Event("specpaint", { bubbles: true }));' in form
|
|
page = _src("B06_Section/B06_Section_UI_Page_Structures_Panel.ts")
|
|
assert 'addEventListener("specpaint", () => refreshAdjustSlots(false))' in page
|
|
|
|
|
|
def test_상자_칸을_고치면_그_부분을_고름() -> None:
|
|
"""54-30 — 칸 고침 = 횡단에서 그 벽을 누른 것과 같은 길 · 단 수 칸은 고른 단을 지킴."""
|
|
page = _src("B06_Section/B06_Section_UI_Page_Structures_Panel.ts")
|
|
assert '[data-spec-item="outlet.tiers"]' in page
|
|
assert "`extra${Number(box.dataset.specIndex)}`" in page
|
|
assert "refreshCard?.(target.chainage_m);" in page
|
|
|
|
|
|
def test_흙막이_상자는_사면안정_흙막이와_같은_칸() -> None:
|
|
pipe = _src("A00_Common/design/design_structure_pipe.ts")
|
|
soil = pipe[pipe.index('id: "soil_add"') :]
|
|
assert soil[: soil.index("},")].count("items: guardItems(),") == 1
|
|
|
|
|
|
def test_관_보호공_연동_경사_단추() -> None:
|
|
row = _src("B05_Profile/B05_Profile_UI_Drainage_Revet_Choice.ts")
|
|
assert 'toggleButton("연동"' in row and 'toggleButton("경사"' in row
|
|
assert "b05-structure__half-pair" in row
|
|
session = _src("B06_Section/B06_Section_UI_Page_Link_Session.ts")
|
|
assert "revetLink.setFollowGrade(owner, on)" in session
|
|
assert "revetLink.setLinked(s.chainage_m, on)" in session
|