Files
Aislo/resources/tester/test_177_3_station_line_keep.py
T
eomsangdonandClaude Opus 5.5 2d4c65dc78 fix(b06): 횡단 카드 고름 뒤 종단 측점 세로선 유지 · 종단 누름 반대 길도 (177-3)
- setSelectedStructure keepStation — B06 카드가 선 주인 · 선 없는 구조물 · 풂도 카드 선 지킴
- 새 시험 test_177_3_station_line_keep

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015sDZSjFvoiDjdGpgj3muc3
2026-10-10 11:47:34 +09:00

73 lines
2.3 KiB
Python

# -*- coding: utf-8 -*-
"""177-3 B06 횡단 카드 고름 → 종단 측점 세로선 유지(반대 방향도).
못박는 것
- 카드 고름 뒤 리스너의 selectMark(mark) 가 측점선을 끄지 않음 — 일반 · 벽 · 노면공 카드 = 그 카드 선.
- 관 카드 · 관 알약 = 관 측점선 · 카드 풂 = 선 끔.
- 종단 측점선 누름(반대 길)도 같은 리스너 — 누른 선 그대로.
- B05(keepStation 기본값) = 지금 그대로(선 없는 구조물 → 선 끔).
Node 헬퍼 `helper_177_3_station_line_keep.cjs` 가 진짜 design_profile.ts 본문을 돌림. 화면은 사용자 확인.
"""
import json
import os
import subprocess
import pytest
HERE = os.path.dirname(os.path.abspath(__file__))
ROOT = os.path.abspath(os.path.join(HERE, "..", ".."))
def _read(*parts: str) -> str:
with open(os.path.join(ROOT, *parts), encoding="utf-8") as handle:
return handle.read()
@pytest.fixture(scope="module")
def out():
proc = subprocess.run(
["node", os.path.join(HERE, "helper_177_3_station_line_keep.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["plainCard"] == "s40"
assert out["wallCard"] == "s100"
assert out["paveCard"] == "s140"
def test_관은_관_측점선(out):
assert out["pipeCard"] == "irr-80"
assert out["pipeFromPlain"] == "irr-80"
def test_반대_길_종단_측점선_누름도_유지(out):
assert out["profileClick"] == "s200"
assert out["release"] is None
def test_B05_기본_길은_그대로(out):
assert out["b05Wall"] is None
assert out["b05Pipe"] == "irr-80"
assert out["b05Keep"] == "irr-80"
def test_배선():
svp = _read("B06_Section", "B06_Section_UI_Section_View_Profile.ts")
assert "profile?.setSelectedStructure(structureId, true);" in svp
assert "profile.setSelectedStructure(markedId, true);" in svp
cross = _read("A00_Common", "design", "design_view_cross.ts")
assert "sectionView.selectMark(mark, false);" in cross
b05 = _read("A00_Common", "design", "design_view_profile.ts")
assert ", true)" not in "".join(
line for line in b05.splitlines() if "setSelectedStructure(" in line
)