feat(b08): 거리이정표 시점 모달 — 중점 측점 km · 설명 줄 지움 · 카카오 지도 시점 · 중점 표지 (255-1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018jonfdxn1Xit9bdkNJpE4G
This commit is contained in:
2026-10-11 13:58:00 +09:00
co-authored by Claude Opus 5.5
parent c172c4a462
commit 24be69f325
4 changed files with 93 additions and 45 deletions
@@ -147,10 +147,8 @@ def test_화면_모달_팬줌_그림탭():
place = _read("B08_Quantity/B08_Quantity_UI_Milestone_Place.ts")
assert 'from "../B01_Dashboard/B01_Dashboard_Api_Fetch"' in place
assert "searchAddress(text)" in place
assert 'from "../B01_Dashboard/B01_Dashboard_UI_MapPreview"' in modal # 공사지 모달 지도
# ② 시점 모달 — 등록 주소 · VWorld 주소 · 지도
assert "/quantity/milestone/site-address" in modal and "map.showPoint(" in modal
assert "프로젝트 등록 주소" in modal and "시점 브이월드 주소" in modal
# ② 시점 모달 — 지도 = 공용 카카오 지도(255-1 · 주소 줄 지움)
assert "/quantity/milestone/site-address" in modal and "editMap(projectId" in modal
# ⑤ 거래처 상자 = 같은 등록 모달(고침 · 삭제 · 244-13) · 구간 km · 도로 구분 = 연결선 모달
for text in ('"수정"', 'label: "삭제"', "rowValues()", "putMilestone(projectId, fresh)"):
assert text in add
@@ -116,8 +116,8 @@ def test_표_폭_다이어그램_폭_좌측_카드_없음():
assert "milestoneCardBody" not in _read("B08_Quantity/B08_Quantity_UI_Milestone_State.ts")
modal = _read("B08_Quantity/B08_Quantity_UI_Milestone_Modal.ts")
site = modal[modal.index("export function openSiteInfo") :]
assert 'label: "중점 측점 (m)"' in site and 'label: "시점 → 중점 도로"' in site
assert "fresh.site.mid_station_m =" in site and "putMilestone(projectId, fresh)" in site
assert 'label: "중점 측점 (km)"' in site and 'label: "시점 → 중점 도로"' in site
assert 'setLeg(fresh, "start", 0, {' in site and "putMilestone(" in site
# 244-13 — 기준점 = 등록 모달 분류 「기준위치」 · [기준점 +] 없앰 · 삭제 = 기준점 없음
base = modal[
modal.index("export function openPlaceModal") : modal.index("interface SiteAddress")
@@ -0,0 +1,51 @@
"""255-1 거리이정표 시점 모달 — 중점 측점 km 로 보이고 받음(저장은 m) · 설명 줄 지움 ·
지도 = 공용 카카오 지도(시점 · 중점 표지)."""
import json
import re
import subprocess
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
IMPORTS = re.compile(r"^import[^;]*;\n", re.MULTILINE)
def _read(rel):
return (ROOT / rel).read_text(encoding="utf-8")
def _node(expr):
src = _read("B08_Quantity/B08_Quantity_Milestone_Layout.ts")
result = subprocess.run(
["node", "--experimental-strip-types", "--no-warnings",
"--input-type=module-typescript", "-e",
IMPORTS.sub("", src) + f"\nconsole.log(JSON.stringify({expr}));"],
capture_output=True, text=True, encoding="utf-8", timeout=60,
) # fmt: skip
assert result.returncode == 0, result.stderr
return json.loads(result.stdout)
def _site(km):
data = {"site": {"mid_station_m": 999, "mid_road": "비포장"}, "base": {}, "routes": []}
return _node(f'setLeg({json.dumps(data)}, "start", 0, {{ km: {json.dumps(km)} }}).site')
def test_중점_km_저장_m():
assert _site(1.2345)["mid_station_m"] == 1234.5
assert _site(0.0005)["mid_station_m"] == 0.5
assert _site(None)["mid_station_m"] is None # 빈칸 = 노선 ÷ 2
def test_시점_모달_km_카카오_지도():
modal = _read("B08_Quantity/B08_Quantity_UI_Milestone_Modal.ts")
site = modal[modal.index("export function openSiteInfo") :]
assert 'label: "중점 측점 (km)"' in site
assert "String(data.site.mid_station_m / 1000)" in site # 보임 = km
assert 'setLeg(fresh, "start", 0, {' in site # 받음 km → 저장 m
# 설명 줄 · 등록 주소 · 브이월드 주소 줄 · B01 타일 지도 없음
for gone in ("시점 = 노선 첫 점", "프로젝트 등록 주소", "브이월드 주소", "buildAddressMap"):
assert gone not in modal
assert "editMap(projectId" in site
assert '["start", "시점", s.start_lonlat]' in site and '["mid", "중점", s.mid_lonlat]' in site
assert 'dialogClass: "b08-milestone__modal"' in site # 다른 모달과 같은 창 · 지도 높이