Files
Aislo/resources/tester/test_634_2_hover_table.py
T
eomsangdonandClaude Opus 5.5 a83db2c6f8 feat(635-3): B05 왼쪽 위치 · 그리기 칸(예정노선 키트) · 예정노선 수정 켬끔 · 받은 노선 비교 · 받은 노선으로 · 켬 때 어둡게(요구 546)
- ExpectedDraw = 키트 createPlanKit 「b05」 한 벌 — 위치 칸(찾기 → 지도 이동만) · 그리기 칸 머리 「예정노선 수정」 · 받은 노선 켬끔 · 길이 비교 한 줄 · [받은 노선으로](받은 꼭짓점 다시 추적 + 초안 expected [] · 한 걸음)
- 고칠 선 = 받은 원본 꼭짓점(GET /route/plan/source · 635-2) · 고친 뒤엔 고친 꼭짓점
- 새 B05_Profile_UI_Panel_Plan — registerPanelSection order 1 · 2 빈 자리 + 편집기가 채움
- 켬 = 발자국 ~ 구조물 마커 불투명 --draw-map-dim(0.35 · 새 토큰) · 등고 높이값 · 예정노선 그림은 그대로 · 장면 overAll = { paint, dim }
- 도구줄 「예정노선 변경」 · 「예정노선 원본」 걷음(map_toolbar · map_tools · Chrome · css)
- RouteEdit 683 → 682 줄(주석 한 줄 걷고 frame 한 줄) · Render 648 → 653
- 시험: 새 test_635_3 · 626_3 키트 · 아이콘 걷음 대조로 고침 · 551_2 불투명 값(색 아님) 받음 · 568_1 · 634_2 아이콘 목록에서 둘 뺌(걷음)
- 검증_sub6 B: 픽셀 불투명 255 → 89 · 끌기 · 지움 · 다시 긋기 · 받은 노선으로 · 저장 · 다시 열기 · 초기화 = 받은 노선 · 지킴 지문 110/110 · 되돌림

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 12:28:43 +09:00

110 lines
4.6 KiB
Python

"""634-2 표 두 장(요구 546) — 그룹1 22 겹 호버제목 · 묶음 · 그룹2 17 줄 호버제목 · 페이지 덮어쓰기 없음 · 계류 · 도로 띠 둘."""
import re
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
MAP = ROOT / "A00_Common" / "map"
def _read(path: Path) -> str:
return path.read_text(encoding="utf-8")
# 요구 546 그룹1 표(호버제목 · 아이콘 그룹명) + 도로300m(표 밖 · 「도로」 묶음)
GROUP1 = [
("satellite", "위성사진", None),
("hillshade", "음영기복도", None),
("contour", "등고선", None),
("slope", "급경사", None),
("stream", "세류", "water"),
("water", "하천", "water"),
("zeroOrder", "0차곡", "water"),
("bands", "계류100m", "water"),
("road", "도로", "road"),
("nationalRoad", "임도망도", "road"),
("forestRoadFile", "임도(업로드)", "road"),
("roadBands", "도로300m", "road"),
("cadastral", "지적도", "land"),
("building", "건물", "land"),
("place", "지명", "land"),
("zones", "보호규제구역", "limit"),
("soils", "산림입지도", "limit"),
("ecoForest", "국유림·사유림", "limit"),
("ecology", "생태자연도", "limit"),
("landslide", "산사태위험지도", "limit"),
("landslideZones", "산사태취약지역", "limit"),
("faults", "단층", "limit"),
("lineaments", "지질구조선", "limit"),
]
GROUP2 = [
("hint-toggle", "도움말"),
("undo", "되돌리기"),
("redo", "다시하기"),
("view3d", "3D"),
("rotate-ccw", "좌 회전"),
("rotate-cw", "우 회전"),
("contour-minor", "등고선 1m"),
("stations", "측점"),
("slopes", "길이·기울기"),
("footprint", "절성토선"),
("measure", "길이측정"),
("station-snap", "스냅"),
("snap-step", "스냅 간격"),
("recommend", "추천노선"),
("terrain", "수치지형도/라이다"),
]
def test_그룹1_표_차례_호버_묶음():
src = _read(MAP / "map_layer_list.ts")
rows = re.findall(r'row\("(\w+)", "\w+", "([^"]+)", (?:"(\w+)"|null)', src)
assert [(k, t, g or None) for k, t, g in rows] == GROUP1
for name in ("수계망도", "도로", "토지·건물", "제한·재해"):
assert f'name: "{name}"' in src
# 표 「사용」 = 두 페이지 모두 · 숨김 표 없음
assert "pages: BOTH" in src and "hide" not in src[src.index("MAP_LAYER_PAGES") :]
def test_그룹2_표_호버():
src = _read(MAP / "map_toolbar.ts")
rows = re.findall(r'key: "([\w-]+)",\s+title: "([^"]+)"', src)
assert rows == GROUP2
tools = _read(ROOT / "ui_template" / "ui_template_map_tools.ts")
for key, title in GROUP2[1:-2]: # 추천 · 지형 = 페이지 요소
if key != "snap-step":
assert re.search(rf'"?{key}"?: \{{ icon: "\w+", title: "{title}"', tools), key
def test_페이지_호버_덮어쓰기_없음():
files = [
ROOT / "B05_Profile" / "B05_Profile_UI_RouteEdit_Chrome.ts",
ROOT / "D03_PlanAnalysis" / "D03_PlanAnalysis_UI_Map.ts",
ROOT / "A00_Common" / "design" / "design_view_profile_3d_modal.ts",
]
for path in files:
for call in re.findall(r"mapToolButton\([^)]*\)", _read(path), re.S):
assert "title" not in call, (path.name, call)
layers = _read(ROOT / "B05_Profile" / "B05_Profile_UI_RouteEdit_Layers.ts")
assert (
"layerBar.root.querySelector" not in layers
and "layerBar.sync({ ready: !!meta, glOn, why })" in layers
)
assert 'forestRoadFile: "받은 임도 자료 없음"' in layers # B05 임도(업로드) 막힘 + 까닭
edit = _read(ROOT / "B05_Profile" / "B05_Profile_UI_RouteEdit.ts")
assert 'mapToolTip(minorContourButton, contours?.minor ? null : "LAS 등고선 없음")' in edit
bar = _read(MAP / "map_layer_bar.ts")
assert 'const GL_TITLE = "그래픽 카드";' in bar and "multi: true" in bar
def test_계류_도로_띠_둘():
specs = _read(MAP / "map_layer_specs.ts")
assert 'fillEdge("roadBands", "bands"' in specs and 'fillEdge("bands", "bands"' in specs
assert specs.index('fillEdge("roadBands"') < specs.index('fillEdge("bands", "bands"') # 옛 차례
legend = _read(MAP / "map_legend.ts")
assert "...(on.bands" in legend and "...(on.roadBands" in legend
paint = _read(ROOT / "D03_PlanAnalysis" / "D03_PlanAnalysis_UI_LayerPaint.ts")
assert "if (on.roadBands)" in paint and "if (on.bands)" in paint
b05 = _read(ROOT / "B05_Profile" / "B05_Profile_UI_RouteEdit_Layers.ts")
assert 'key === "bands" || key === "roadBands"' in b05 and "fetchPlanBands(projectId)" in b05