- 「미지정」 열 · 조합 칸 「미지정」 표기 · 측점 「· 미연결」 글 지움 - 미연결 줄 측점 칸 = 경고 노랑 램프 · 호버 = 구조물 조합 미연결 — 빈 조합 칸 - 서버 안내 글 「노랑 램프 줄을 눌러 조합 연결」 - 새 시험 test_198_1 · test_61_1 · 143_1 · 160_2 단정 고침 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01STqEqztUthVFBmEP18wBSz
70 lines
2.4 KiB
Python
70 lines
2.4 KiB
Python
"""160-2 B08 구조물 집계표 빈 조합 칸 글(198-1 부터 미연결 램프 호버 글 · 「미지정」 열 · 칸 표기는 지움).
|
|
|
|
`B08_Quantity_Summary_Data.ts` 를 `common_util_summary_item.ts` 와 이어 붙여 node 로 돌림(61-1 시험과 같은 꼴).
|
|
"""
|
|
|
|
import json
|
|
from pathlib import Path
|
|
|
|
from test_61_1_b08_summary_table import _item, _run
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
|
|
|
|
def _slot(copy: str, group, item=None, linked=False) -> dict:
|
|
return {"copy": copy, "group": group, "item": item, "linked": linked}
|
|
|
|
|
|
FACILITIES = [
|
|
{
|
|
"id": "pipe@100",
|
|
"type_id": "pipe",
|
|
"name": "배관",
|
|
"facility": "pipe",
|
|
"chainage_m": 100.0,
|
|
"slots": [
|
|
_slot("pipe@100", None),
|
|
_slot("pipe@100__gpipe", "관", _item("SS2")),
|
|
_slot("pipe@100__gin", "관 보호공(유입)", _item("SS3"), linked=True),
|
|
],
|
|
},
|
|
{
|
|
"id": "s1",
|
|
"type_id": "ford_bridge",
|
|
"name": "세월교",
|
|
"facility": None,
|
|
"chainage_m": 100.004,
|
|
"slots": [_slot("s1__gfordout", "유출 구조", {"key": "깨짐"})], # 모양 틀림 = 조합 없음
|
|
},
|
|
{
|
|
"id": "s2",
|
|
"type_id": "box",
|
|
"name": "BOX",
|
|
"facility": None,
|
|
"chainage_m": 160.0,
|
|
"slots": [_slot("s2", None, _item("SS1"), linked=True)], # 빈 칸 없음 = 이름만
|
|
},
|
|
]
|
|
|
|
|
|
def test_빈_조합_칸_글():
|
|
out = _run(
|
|
f"\nconst f = {json.dumps(FACILITIES, ensure_ascii=False)};"
|
|
"\nconst at = (s) => unlinkedAt(f, s);"
|
|
"\nconsole.log(JSON.stringify({"
|
|
" t100: unassignedText(at(100), '본체'), t160: unassignedText(at(160), '본체'),"
|
|
" t0: unassignedText(at(0), '본체') }));"
|
|
)
|
|
assert out["t100"] == "배관: 본체 · 관 / 세월교: 유출 구조"
|
|
assert out["t160"] == "BOX" and out["t0"] == ""
|
|
|
|
|
|
def test_화면_연결():
|
|
summary = (ROOT / "B08_Quantity/B08_Quantity_UI_Summary.ts").read_text(encoding="utf-8")
|
|
assert (
|
|
'unassignedText(unlinkedAt(unlinked, station), L("B08_Quantity_Link_Body"))' in summary
|
|
) # 칸 이름 = 모달과 같은 규칙
|
|
assert 'key: "unassigned"' not in summary and "unassignedCombos" not in summary # 198-1
|
|
locale = (ROOT / "ui_template/ui_template_locale_b4.ts").read_text(encoding="utf-8")
|
|
assert "B08_Quantity_Summary_Unassigned" not in locale
|