Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018jonfdxn1Xit9bdkNJpE4G
34 lines
1.3 KiB
Python
34 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, ") == 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
|