- 좌측 구조물 조합 = 층 단추 · 나무만 · 구조물 도면 · 일위대가 · 면적산출 하위와 수평선 지움 - 「전체 항목」 목록 화면 길(onAll · buildAllItems) 지움 · 상세는 카드 [수정]으로 - 쓰는 곳 없는 structureLabel · 로케일 키 다섯 · 하위 CSS 지움 - 낡은 글 찾기 시험을 지금 코드에 맞춤 · 화면 시나리오 ui_checks/45-2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BVPp2o6Mh2FZJr72yW3ofZ
72 lines
3.3 KiB
Python
72 lines
3.3 KiB
Python
"""좌측 패널 일위대가(PLAN 39-2) — 맨 위 「일위대가 조합」 컨테이너 · 조합 나무 · 둘째 층 단추 벌 지움 ·
|
|
일위대가는 구조물 조합 하위(구조물 도면 → 일위대가 → 면적산출). 글 검사(화면은 ORCA).
|
|
|
|
옛 일위대가 라이브러리 나무 시험(PLAN 27-2b · 30-3 · 30-5)은 나무를 지우며 이 검사로 갈음.
|
|
"""
|
|
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
M02 = ROOT / "M02_MasterTemplete"
|
|
|
|
|
|
def _text(name: str) -> str:
|
|
return (M02 / name).read_text("utf-8")
|
|
|
|
|
|
def test_일위대가_나무_파일과_이음이_없음():
|
|
assert not (M02 / "M02_MasterTemplete_Labor.ts").exists()
|
|
assert not (M02 / "M02_MasterTemplete_Labor_Tree.ts").exists()
|
|
page = _text("M02_MasterTemplete_UI_Page.ts")
|
|
assert "buildLaborSection" not in page and 'layerBar("일위대가"' not in page
|
|
side = _text("M02_MasterTemplete_UI_Side.ts")
|
|
assert "LaborSection" not in side and "labor?." not in side
|
|
|
|
|
|
def test_나무_부품에_일위대가_전용_칸_없음():
|
|
panel = _text("M02_MasterTemplete_TreePanel.ts")
|
|
for gone in ("maxDepth", "opt.item", "opt.clipKind", "clipKind?:"):
|
|
assert gone not in panel, gone
|
|
|
|
|
|
def test_좌측_하위_컨테이너와_전체_항목_길_없음():
|
|
"""45-2 — 구조물 조합 안 하위(구조물 도면 · 일위대가 · 면적산출 · 각 「전체 항목」) 없앰 ·
|
|
상세는 항목 카드 [수정]으로."""
|
|
side = _text("M02_MasterTemplete_UI_Side.ts")
|
|
for gone in (
|
|
"COLUMN_KINDS",
|
|
"columnSections",
|
|
"onAll",
|
|
"allPicked",
|
|
"selectColumn",
|
|
"m02-side__rule",
|
|
):
|
|
assert gone not in side, gone
|
|
page = _text("M02_MasterTemplete_UI_Page.ts")
|
|
assert "buildAllItems" not in page and "onAll" not in page and "ALL_TITLE" not in page
|
|
assert "buildAllItems" not in _text("M02_MasterTemplete_ItemList.ts")
|
|
api = _text("M02_MasterTemplete_Api_Fetch.ts")
|
|
assert '| "labor";' in api and "일위대가번: string;" in api
|
|
locale = (ROOT / "ui_template" / "ui_template_locale_m2.ts").read_text("utf-8")
|
|
for gone in ("M02_ItemsAll", "M02_KindLabor", "M02_KindStructure", "M02_KindArea"):
|
|
assert gone not in locale, gone
|
|
assert "B01_Dashboard_CardUnitCombo" not in locale # 대시보드 일위대가 카드 없앰(44-7)
|
|
css = _text("M02_MasterTemplete_UI_Style.css")
|
|
assert ".m02-side__rule" not in css and ".m02-side__summary" not in css
|
|
|
|
|
|
def test_층_단추는_구조물_조합_한_벌():
|
|
page = _text("M02_MasterTemplete_UI_Page.ts")
|
|
assert page.count('layerBar("') == 1 # 구조물 조합 줄 아래 하나
|
|
assert 'layerBar("구조물조합", tree.add, () => void main.openTable(layer)),' in page
|
|
|
|
|
|
def test_나무가_바뀌면_집계표를_다시_엶():
|
|
"""39-8 H1 — 새 항목 · 복사 생성 · 붙여넣기 · 지우기 · 이름 · 옮기기 = 나무 `apply` →
|
|
`onChanged` 한 길 · 좌측 하위 열 줄은 없앰(45-2)."""
|
|
page = _text("M02_MasterTemplete_UI_Page.ts")
|
|
changed = page.split("onChanged: async (colId) => {")[1].split("},")[0]
|
|
assert "main.openTable(layer, colId, true)" in changed and "side.refresh()" not in changed
|
|
panel = _text("M02_MasterTemplete_TreePanel.ts")
|
|
assert panel.count("await opt.onChanged(") == 1 # 나무 고침은 모두 apply 한 곳을 거침
|