- 판정 셈을 logic/B05_Profile_Profile_CrossPick.ts 한 함수(crossPickAt)로 뺌 — 누름 · 표시가 같은 판정 - 원지반선 위아래 8 px · 추가 측점 선 = 그 측점 · 측점선 · 단추 · 도구 중 · 끌기 · 스크롤 = 안 그림 - 포인터 이동 소수 px 를 누름과 같이 내려 맞춤 — 0.5 m 경계 1 m 어긋남 막음 - 시험 test_490_1_cross_pick · test_368_3 연결 자리 갱신 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
34 lines
1.6 KiB
Python
34 lines
1.6 KiB
Python
"""368-3 원지반 점 임시 횡단 작은 창 · 추가 측점 점선 · 우클릭 「측점 삭제」 — 연결 자리를 소스로 봄.
|
|
|
|
화면 동작(누름 → 창 → [측점 추가] → B06 카드 → 삭제)은 ORCA 로 확인.
|
|
"""
|
|
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
|
|
|
|
def _read(relative: str) -> str:
|
|
return (ROOT / relative).read_text(encoding="utf-8")
|
|
|
|
|
|
def test_추가_측점_선_점선_끌기_없음() -> None:
|
|
graph = _read("B06_Section/B06_Section_UI_Longitudinal.ts")
|
|
assert 'station.kind === "irregular" && !station.plus' in graph
|
|
assert 'station.plus ? "plus" : station.kind' in graph
|
|
css = _read("B06_Section/B06_Section_UI_Style_Cross.css")
|
|
rule = css[css.index(".b06-chart__station-line--plus") :].split("}")[0]
|
|
assert "var(--color-warning)" in rule and "stroke-dasharray: 5 3" in rule
|
|
assert "PLUS_OWNER_PREFIX" in _read("B05_Profile/B05_Profile_UI_Profile_Layout.ts")
|
|
|
|
|
|
def test_누름_작은_창_우클릭_삭제() -> None:
|
|
render = _read("B05_Profile/B05_Profile_UI_Profile_Render.ts")
|
|
assert "crossPickFromEvent(chartWrap, event" in render and "openCrossModal(" in render
|
|
assert "onRemovePlus: removePlusStation" in render
|
|
menu = _read("B05_Profile/B05_Profile_UI_Profile_Structures.ts")
|
|
assert '"측점 삭제", () => options.onRemovePlus?.(near.station.chainage_m)' in menu
|
|
modal = _read("B05_Profile/B05_Profile_UI_Profile_CrossModal.ts")
|
|
assert "previewStructureSections(projectId(), [m])" in modal
|
|
assert "add.disabled = taken" in modal # 같은 m 막음
|