fix(B05 평면 곡선 창): 곡선 없는 교각점(삼각)도 하단에 「내각 N° · 곡선 없음」 표기 (403-1)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Se7ytqbohmBQnfYpwYFnYf
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
"""403 곡선 없는 교각점(삼각) 각도 글(요구 250-5) — 곡선 창 하단에 곡선 있는 자리와 같은 「내각 N°」.
|
||||
|
||||
Node 헬퍼(`helper_403_triangle_angle.cjs`)가 `_Label.curveInfoText` 를 트랜스파일해 돌림.
|
||||
./venv/Scripts/python.exe -m pytest resources/tester/test_403_triangle_angle.py -q
|
||||
"""
|
||||
|
||||
import json
|
||||
import subprocess
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
HERE = Path(__file__).resolve().parent
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def texts():
|
||||
proc = subprocess.run(
|
||||
["node", str(HERE / "helper_403_triangle_angle.cjs")],
|
||||
capture_output=True,
|
||||
text=True,
|
||||
encoding="utf-8",
|
||||
timeout=60,
|
||||
)
|
||||
assert proc.returncode == 0, proc.stderr
|
||||
return json.loads(proc.stdout)
|
||||
|
||||
|
||||
def test_곡선_있는_자리_그대로(texts):
|
||||
assert texts["curve"] == "내각 132°"
|
||||
assert texts["curveOptional"] == "내각 160° · 155° 이상 — 곡선 생략 가능"
|
||||
|
||||
|
||||
def test_삼각_자리도_내각(texts):
|
||||
assert texts["triangle"] == "내각 133° · 곡선 없음 — 직선이 그대로 꺾입니다"
|
||||
assert texts["triangleOptional"].startswith("내각 168° · ")
|
||||
|
||||
|
||||
def test_내각_모르면_곡선_없음만(texts):
|
||||
assert texts["triangleUnknown"] == "곡선 없음 — 직선이 그대로 꺾입니다"
|
||||
|
||||
|
||||
def test_화면이_같은_함수를_씀():
|
||||
label = (HERE.parents[1] / "B05_Profile" / "B05_Profile_UI_RouteEdit_Label.ts").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
assert "info.textContent = curveInfoText(state.curveOn, state.innerAngleDeg" in label
|
||||
Reference in New Issue
Block a user