Files
Aislo/resources/tester/test_54_14_balloon_lines.py
T
eomsangdonandClaude Opus 5.5 f93cc56284 fix(B05·B06): 54-30 추가 흙막이 강조 유지 · 관 보호공 [연동] [경사] · 칸 고침 강조 · 흙막이 칸 일원화
- 폼이 상자를 새로 세울 때마다(단 수 · 유입 형식 · 벽 조작 · 저장 · 넘김) 고른 상자 강조 다시(specpaint 한 곳) · 54-29 의 두 군데 호출 대체
- 관 보호공(유입 · 유출) 상자 안 [연동] [경사] 반 폭 두 단추 — 옛 연동 제어 값(revet_link_detached · revet_follow_grade) 그대로 · 쓸 수 있을 때만 활성 · 경사 끄면 연동 잠김 · 누르면 횡단 그림 바로
- 상자 칸을 고치거나 고르면 그 벽을 고름(횡단에서 누른 것과 같은 길 · 카드 다시 그림) · 단 수 칸은 고른 단을 지킴
- 추가 흙막이 상자 = 사면안정 흙막이와 같은 칸(형태 · 길이 · 높이 · 전 · 후) · 구조 고르기 칸과 정의 이름 두 줄 뺌 · 저장 키 그대로
- 시험 54-29 · 54-27 · 52 명세 · 54-14 말풍선 기대값 맞춤

화면 확인(sub5_검증 12+18): 흙막이 1 강조 = 단 2→1 · 넘김 · 저장 뒤 유지 · 형태 고침 → 상자 · 벽 강조 · 경사 끔 → 13+0 벽 이동 · 두 줄 함께 · 목록 대 횡단 같은 글(칸 54) · 단 0 저장으로 되돌림

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BVPp2o6Mh2FZJr72yW3ofZ
2026-10-06 13:47:56 +09:00

100 lines
3.9 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# -*- coding: utf-8 -*-
"""54-14 종단 구조물 알약 정보 라벨 — 중요한 것만.
• 줄 = 이름 · 기준 측점 · 컨테이너마다 첫 옵션 값 한 줄(컨테이너가 없으면 앞 두 줄만)
• 컨테이너 = 좌측 패널 폼과 같은 상자(명세 컨테이너 · 선택 컨테이너는 인스턴스마다 · 정의 옵션 그룹)
• 빈 값 = 등록부 기본값 「(기본)」 · 값 auto = 「(자동)」 · 그것도 없으면 「—」 · 메모 · 그 밖 옵션은 안 씀
• 라벨은 ▲▼ 단추층 위 · 단추 높이만큼 위로 비킴 · B05 · B06 은 같은 레인 — 실제 화면은 ORCA 로 따로 본다.
화면 그릇 없이 Node 헬퍼가 TS 를 트랜스파일해 돌린다(`helper_54_14_balloon_lines.cjs`).
"""
import json
import os
import subprocess
import pytest
HERE = os.path.dirname(os.path.abspath(__file__))
ROOT = os.path.abspath(os.path.join(HERE, "..", ".."))
MARKS = os.path.join(ROOT, "B05_Profile", "B05_Profile_UI_Structures_Marks.ts")
STYLE = os.path.join(ROOT, "B05_Profile", "B05_Profile_UI_Style_Structures.css")
@pytest.fixture(scope="module")
def out():
proc = subprocess.run(
["node", os.path.join(HERE, "helper_54_14_balloon_lines.cjs")],
capture_output=True,
text=True,
encoding="utf-8",
timeout=60,
)
assert proc.returncode == 0, proc.stderr
return json.loads(proc.stdout)
def test_배관_컨테이너마다_첫_값_한_줄(out):
assert out["pipeFull"] == [
"이름",
"5+0",
"관: 관경 1200",
"관 보호공(유입): 구조 집수정",
"관 보호공(유출): 구조 흙막이",
"흙막이 1: 형태 돌망태", # 구조 칸 없음(54-30)
"도수로/돌붙임 1: 구조 도수로",
]
def test_빈_값은_등록부_기본값에_기본_표시(out):
assert out["pipeBlank"] == [
"이름",
"5+0",
"관: 관경 1000 (기본)",
"관 보호공(유입): 구조 흙막이 (기본)",
"관 보호공(유출): 구조 —",
]
def test_흙막이_상자_수는_밖에서_정한_단_수(out):
assert out["pipeCount"][-2:] == ["흙막이 1: 형태 —", "흙막이 2: 형태 —"]
assert len(out["pipeCount"]) == 2 + 3 + 2
def test_박스_본체_규격은_폭_높이로_되찾음(out):
assert out["boxPreset"] == [
"이름",
"5+0",
"본체: 본체 규격 3.0 × 3.0",
"유입 구조: 구조 날개벽",
"유출 구조: 구조 —",
]
assert out["boxBlank"][2] == "본체: 본체 규격 2.0 × 2.0 (기본)"
def test_정의_옵션_그룹은_그룹마다_첫_켜진_옵션(out):
assert out["underdrain"] == ["이름", "5+0", "맹암거: 높이 0.6m"]
assert out["underdrainBlank"] == ["이름", "5+0", "맹암거: 높이 —"]
# 끈 칸(높이)은 건너뜀 · 빈 값은 기본값
assert out["wall"] == ["이름", "5+0", "상세 내용: 길이 10m (기본)"]
assert out["wallAuto"] == ["이름", "5+0", "상세 내용: 길이 (자동)"]
def test_컨테이너가_없으면_이름과_기준_측점만(out):
assert out["mirror"] == ["이름", "5+0"]
assert out["etcEmpty"] == ["이름", "5+0"]
assert out["etcNote"] == ["이름", "5+0", "상세 내용 1: 비고 시험 비고"]
def test_라벨은_단추층_위로_비켜_뜬다():
with open(MARKS, encoding="utf-8") as handle:
marks = handle.read()
with open(STYLE, encoding="utf-8") as handle:
style = handle.read()
assert "EDIT_BUTTON_CLEARANCE_PX = 21" in marks
assert "ROW_GAP_PX + EDIT_BUTTON_CLEARANCE_PX" in marks
assert "balloonLines(" in marks and "structure.memo" not in marks
lane = style.split(".b05-structure__lane {", 1)[1].split("}", 1)[0]
assert "z-index" not in lane # 레인이 쌓임 층을 만들면 라벨이 그 안에 갇힘
balloon = style.split(".b05-structure__balloon {", 1)[1].split("}", 1)[0]
assert balloon.count("z-index") == 1 and "z-index: 6;" in balloon