Files
Aislo/resources/tester/test_143_3_b08_material_cards.py
T
eomsangdonandClaude Opus 5.5 22a54abe99 feat(B08): 자재 셋 값 없는 줄 숨김 · 구조물 탭 표 넷 공용 카드 안(143-3)
- 총괄 · 콘크리트 · 자재수량 — 수량 · 금액 · 손 단위수량 없는 줄 숨김(화면만 · 고친 칸은 원래 줄 자리로 저장)
- 구조물 집계표 · 자재 셋 — 공용 카드 안(토공 표와 같은 꼴)
- 시험 — 새 test_143_3

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01STqEqztUthVFBmEP18wBSz
2026-10-09 14:59:58 +09:00

31 lines
1.3 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")
SUMMARY = (ROOT / "B08_Quantity/B08_Quantity_UI_Summary.ts").read_text(encoding="utf-8")
def test_자재_셋_값_없는_줄_숨김():
assert MATERIAL.count("const keep = shown(rows, ") == 3 # 총괄 · 콘크리트 · 자재수량
assert "row.qty != null || anyValue(row.units)" in MATERIAL # 손 단위수량 있으면 보임
assert "row.qty != null || anyValue(row.amounts)" 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] })" in MATERIAL
assert "createCard({ body: parts })" in SUMMARY