- design_profile_save.ts 새 파일 — 한 본문 [저장] 조각 · [확정] 직전 저장 · 저장 뒤 서버 선형 넘김 - 높이 캐스케이드 설명을 B05_Profile_UI_Profile_Heights 머리로 옮김 - 팝아웃 시험 목록에 새 파일 · 저장 조각 시험(test_472_6_profile_save) 추가 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
31 lines
1.2 KiB
Python
31 lines
1.2 KiB
Python
"""472 마무리 — 종단도 계획고 [저장] 조각을 `design_profile_save.ts` 로 떼어 냄(700줄 한계 · 동작 같음).
|
|
|
|
`helper_472_6_profile_save.cjs` 가 진짜 본문을 돌림 — 편집 없음 · 노선 초안 미리보기 · 노선 없음 = 조각 없음 ·
|
|
조각 본문 = 노선 id + 편집 · 저장 뒤 버린 자리 알림 → 서버 선형 넘김 · [확정] 직전 저장 = 같은 창구 한 번.
|
|
|
|
./venv/Scripts/python.exe -m pytest resources/tester/test_472_6_profile_save.py -q
|
|
"""
|
|
|
|
import json
|
|
import os
|
|
import subprocess
|
|
|
|
HERE = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
|
|
def test_계획고_저장_조각() -> None:
|
|
proc = subprocess.run(
|
|
["node", os.path.join(HERE, "helper_472_6_profile_save.cjs")],
|
|
capture_output=True,
|
|
text=True,
|
|
encoding="utf-8",
|
|
timeout=60,
|
|
)
|
|
assert proc.returncode == 0, proc.stderr
|
|
r = json.loads(proc.stdout)
|
|
edits = {"station_offsets": {"10": 0.5}, "curve_radii": {}}
|
|
assert r["nulls"] == {"clean": None, "preview": None, "noRoute": None}
|
|
assert r["body"] == {"route_id": 7, **edits}
|
|
assert r["adopted"] == [{"base_pvi": [2]}, {"base_pvi": [1]}]
|
|
assert r["calls"] == [["notice", [3]], ["put", "p", 7, edits], ["notice", []]]
|