Merge remote-tracking branch 'origin/sub_laptop_4' into sub_laptop_2

This commit is contained in:
2026-10-11 16:51:35 +09:00
9 changed files with 73 additions and 23 deletions
+1 -1
View File
@@ -156,7 +156,7 @@ def test_좌측_패널_컨테이너_셋과_저장_줄():
)
assert 'card("summary", "B08_Quantity_Tab_StructureSummary", one.root),' in panel
assert 'card("material", "B08_Quantity_Tab_Materials", ...surchargeBlock),' in panel
assert "ui-collapsible ui-sidebar-section ui-sidebar-card" in panel
assert "createPanelCard(L(title))" in panel # 269 좌측 패널 공용 카드
assert (
'actions.className = "ui-sidebar-actions"' in panel and "attachCollapsible(panel)" in panel
)
@@ -21,11 +21,11 @@ SHELL = (ROOT / "B09_Estimation/B09_Estimation_UI_Shell.ts").read_text("utf-8")
def test_묶음_이름_단추_글_설명_없음():
assert 'heading.textContent = "데이터 점검";' in SHELL and "원가 단가" not in SHELL
assert 'createPanelCard("데이터 점검")' in SHELL and "원가 단가" not in SHELL # 269 공용 카드
assert 'label: "업데이트",' in SHELL and "단가 갱신" not in SHELL
# 옛 굳힌 시각 안내 글(made) 없음 · 묶음 = 제목 · [업데이트] · 연결 점검
assert "made.textContent" not in SHELL and "b09-estimation__hint" not in SHELL
assert "section.append(heading, refresh, check.list);" in SHELL
assert "section.append(refresh, check.list);" in SHELL # 제목 = 공용 카드(269)
assert "check.draw(payload, sheets);" in SHELL
@@ -48,7 +48,12 @@ def test_끌기_미리_보기_어디_안_몇_레벨_폴더_테두리_끄는_줄_
def test_데이터_점검_업데이트_위_틈_카드_왼쪽_여유와_같음():
css = _read(B09 / "B09_Estimation_UI_Page.css")
m = re.search(r"\.b09-options \[data-b09-refresh\] \{\s*margin-top: ([^;]+);", css)
assert m and m.group(1) == "calc(var(--spacing-8) + var(--spacing-4))"
# 269 — 공용 카드 틈(8) + 4 = 카드 왼쪽 여유(12)
assert m and m.group(1) == "var(--spacing-4)"
overlay = _read(ROOT / "ui_template" / "ui_template_overlay.css")
assert re.search(
r":where\(\.ui-sidebar-card\.ui-panel-form\) \{[^}]*gap: var\(--spacing-8\);", overlay
)
card = _read(ROOT / "ui_template" / "ui_template_overlay.css")
assert re.search(
r"\.ui-sidebar-card \{\s*padding: calc\(var\(--spacing-8\) \+ var\(--spacing-4\)\);", card
+50
View File
@@ -122,3 +122,53 @@ def test_B06_컨테이너_공용_양식():
rule = _block(B06_CSS, line[:-2])
for prop in ("height", "padding", "font-size"):
assert not re.search(r"(?:^|\s)" + prop + r"\s*:", rule), (line, prop)
B08_OPTIONS = _read("B08_Quantity/B08_Quantity_UI_Options.ts")
B09_SHELL = _read("B09_Estimation/B09_Estimation_UI_Shell.ts")
# 기준(「구조물 배치」 폼 자신) · 부르는 곳 없는 옛 함수는 점검 밖
PANEL_DIRS = (
"A00_Common/design",
"B05_Profile",
"B06_Section",
"B07_DesignDetail",
"B08_Quantity",
"B09_Estimation",
)
REFERENCE = {
"B05_Profile/B05_Profile_UI_Structures_Form.ts",
"B05_Profile/B05_Profile_UI_IrregularStations.ts",
}
def test_B05_칸_틀_두_보기_모두_공용_양식():
frame = DESIGN_PANEL[DESIGN_PANEL.index("export function createSectionFrame(") :]
frame = frame[: frame.index("\n}\n")]
assert frame.count("ui-sidebar-section ui-panel-form") == 2
def test_B08_B09_카드_공용_카드():
assert "createPanelCard(L(title))" in B08_OPTIONS
assert 'createPanelCard("데이터 점검")' in B09_SHELL
for src in (B08_OPTIONS, B09_SHELL):
assert "ui-sidebar-card" not in src
def test_점검_B05_이상_좌측_컨테이너는_모두_공용_양식():
"""손으로 짠 컨테이너(ui-sidebar-section)에 공용 양식이 빠진 곳 = 0."""
misses, users = [], []
for page in PANEL_DIRS:
for path in (ROOT / page).glob("*.ts"):
rel = path.relative_to(ROOT).as_posix()
text = path.read_text(encoding="utf-8")
if "createIrregularStationsSection(" in text:
users.append(path.name)
if rel in REFERENCE:
continue
for n, line in enumerate(text.splitlines(), 1):
code = line.split("//")[0]
if "ui-sidebar-section" in code and "ui-panel-form" not in code:
misses.append(f"{rel}:{n}")
assert misses == []
# 점검 밖 옛 함수 = 정말 부르는 곳 없음(살아나면 점검에 넣음)
assert users == ["B05_Profile_UI_IrregularStations.ts"]