- M02_Item_Snapshot.linked_snapshots — 지정 ∩ 같은 항목 사본 {구조물 id: 항목 · 폴더 · 부분 · 경로} · B08 · B09 공용
- 집계표 서버 — 잇기 목록을 사본으로 거름 · 조합 모두 없는 칸은 안 셈 · 세월교 날 잇기 · 관 몫 본체 잇기 · 「조합 사본 없는 시설 n곳」 알림 · 응답 linked
- 화면 — 조합 이름 = 사본 경로(층 목록 GET 없음) · 측점 · 조합 열 = 사본 있는 것만 · 구조물도 모달 = 사본만(없으면 사본 없음)
- 시험 — test_98 · 120 · 131 픽스처 잇기 · test_61_2 사본만 · 새 test_143_1
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01STqEqztUthVFBmEP18wBSz
48 lines
2.2 KiB
Python
48 lines
2.2 KiB
Python
"""61-2 · 95-3 B08 구조물도 모달 — 집계표 행에서 열림 · 읽기만 · 집계표와 같은 조합 목록 · 안내 글 키."""
|
|
|
|
import re
|
|
from pathlib import Path
|
|
|
|
DRAWING = Path("B08_Quantity/B08_Quantity_UI_Drawing.ts").read_text(encoding="utf-8")
|
|
SUMMARY = Path("B08_Quantity/B08_Quantity_UI_Summary.ts").read_text(encoding="utf-8")
|
|
PAGE = Path("B08_Quantity/B08_Quantity_UI_Page.ts").read_text(encoding="utf-8")
|
|
LOCALE = Path("ui_template/ui_template_locale_b4.ts").read_text(encoding="utf-8")
|
|
LOCALE_B2 = Path("ui_template/ui_template_locale_b2.ts").read_text(encoding="utf-8")
|
|
|
|
|
|
def test_sheet_tab_gone_modal_wired():
|
|
# 구조물도 탭 없음 · 집계표 행 누름이 모달을 늦게 불러 엶
|
|
assert '"sheet"' not in PAGE and "renderStructureSheets" not in PAGE
|
|
assert "B08_Quantity_Tab_StructureSheet" not in PAGE + LOCALE + LOCALE_B2
|
|
assert "onRowClick" in SUMMARY and 'import("./B08_Quantity_UI_Drawing")' in SUMMARY
|
|
assert "combosAt(things, station)" in SUMMARY
|
|
|
|
|
|
def test_modal_own_class_and_cleanup():
|
|
css = Path("B08_Quantity/B08_Quantity_UI_Drawing.css").read_text(encoding="utf-8")
|
|
assert "min(1320px, 96vw)" in css and "--modal-max: 94vh" in css
|
|
assert "beforeClose" in DRAWING and "cards.destroy()" in DRAWING
|
|
assert 'dialogClass: "b08-sheets"' in DRAWING
|
|
|
|
|
|
def test_read_only():
|
|
# 쓰는 길이 없음 — 저장 · 고침 · PUT/POST 없음 · 카드는 고칠 수 없음
|
|
for word in ("saveTemplate", "write:", "method:", "sheetEdit", "onImport", "onClear"):
|
|
assert word not in DRAWING, word
|
|
assert "editable: () => false" in DRAWING
|
|
|
|
|
|
def test_copy_only():
|
|
# 143-1 — 연결된 사본만(그룹은 `{id}__{그룹}` 사본) · 없으면 「사본 없음」 · M02 층 폴백 없음
|
|
assert (
|
|
"request.linked[combo.copyId]" in DRAWING
|
|
and "sourceOf(request.projectId, copy.폴더)" in DRAWING
|
|
)
|
|
assert "readTemplate" not in DRAWING and "FromMaster" not in DRAWING
|
|
assert "사본 없음" in LOCALE
|
|
|
|
|
|
def test_locale_keys_exist():
|
|
for key in set(re.findall(r'L\("([A-Za-z0-9_]+)"\)', DRAWING)):
|
|
assert f"{key}:" in LOCALE or key.startswith(("B08_Quantity_Summary_", "Common_")), key
|