Files
Aislo/resources/tester/test_143_3_b08_material_cards.py
T
eomsangdonandClaude Opus 5.5 5e25f418cc refactor(b08): 탭 표 자료 읽기 · 표 짜기를 화면 없는 파일로 꺼냄 — 구조물 집계표 · 자재 · 토공 · 수리 입력 · 거리이정표 · 화면은 같은 함수를 씀 · 동작 그대로 (302-3)
- 새 파일 = B08_Quantity_Summary_Table · Material_Tables · Earthwork_Tables · Hydro_Table · Milestone_Table
- 화면 UI 파일 = 불러오기 · 그리기만 · 옛 B08 시험 = 옮긴 글 자리 따라 읽는 파일 더함

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Se7ytqbohmBQnfYpwYFnYf
2026-10-13 08:03:23 +09:00

38 lines
1.5 KiB
Python

# -*- coding: utf-8 -*-
"""B08 구조물 탭 — 자재 셋 값 없는 줄 숨김 · 표 넷 공용 카드 안(PLAN 143-3).
숨김은 화면만 — 셈 · 열 · 단위수량은 그대로 · 고친 칸은 원래 줄 번호(`keep`)로 저장 자리를 찾음.
"""
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
MATERIAL = (ROOT / "B08_Quantity/B08_Quantity_UI_Material.ts").read_text(encoding="utf-8") + (
ROOT / "B08_Quantity/B08_Quantity_Material_Tables.ts"
).read_text(encoding="utf-8")
SUMMARY = (ROOT / "B08_Quantity/B08_Quantity_UI_Summary.ts").read_text(encoding="utf-8") + (
ROOT / "B08_Quantity/B08_Quantity_Summary_Table.ts"
).read_text(encoding="utf-8")
def test_자재_셋_값_없는_줄_숨김():
assert (
MATERIAL.count("const keep = shown(rows, ") == 2
) # 총괄 · 자재수량(콘크리트 = 늘 · 163-5)
assert "row.qty != null || anyValue(row.units)" in MATERIAL # 손 단위수량 있으면 보임
assert "row.qty != null || row.amount != null" in MATERIAL
# 고친 칸 → 원래 줄(숨긴 줄 건너뜀)
for target in (
"rows[keep[i / 2]].id",
"rows[keep[i]].key, key.slice(4)",
"rows[keep[i]].panel",
):
assert target in MATERIAL, target
def test_표_넷_공용_카드_안():
assert (
"createCard({ body: [toolbar, table.root, excel, notes] })" in MATERIAL
) # + 엑셀 알림(160-4) · 안내 = 아래(202-1)
assert "createCard({ body: [table, ...parts] })" in SUMMARY