Files
Aislo/resources/tester/test_634_2_hover_table.py
T
eomsangdonandClaude Opus 5.5 61733d064d feat(지도): 634-2 · 634-3 아이콘 표 두 장 · 묶음 메뉴 · 한 행 배선 · 호버 = 표(요구 546)
- 겹 표(map_layer_list) = 그룹1 22 줄 표 차례 · title = 호버제목 · group(수계망도 · 도로 · 토지·건물 · 제한·재해) · pages · 숨김 표 걷음 · 도로300m 한 줄(「도로」 묶음 · 기능 남김)
- 겹 줄(map_layer_bar) = 단독 넷 | 묶음 넷(여럿 고르기 메뉴 · 켠 수 배지 · 안 닫힘) | 그래픽 카드 · sync 가 단추 · 메뉴 줄 막힘 · 글을 맞춤(why = 페이지 까닭)
- 도구 표(map_toolbar) = 그룹2 17 줄 title · mapToolGroups 가 글을 표로 맞춤 · 기본 단추 생성 · 지형 칩 막힘 「수치지형도/라이다 — 까닭」
- 띠 = 한 자료 · 겹 둘(GL fillEdge 거름 · 옛 캔버스 · 범례 줄 따로) · B05 띠 받기(D03 과 같은 서버 길 · bandCollection 공용)
- D03 = 겹 줄 · 도구줄 한 행(createMapToolRow) · 222px 기댐 · 줄바꿈 CSS 걷음 · 측점 · 기울기 호버 덮어쓰기 걷음 · LAS 올리기 호버 걷음
- B05 = 세로 두 줄 → 한 행 · 호버 덮어쓰기 걷음(도구줄 · 1m 등고선 · 3D · 추천) · 겹 막힘 querySelector 덮어쓰기 → 공용 sync · 임도(업로드) 보임 + 「받은 임도 자료 없음」 막힘 · 스냅 간격 날 select → 고르기 메뉴(하나)
- 켬끔 기억 열쇠 · 측점 · 기울기 처음 값 · 그래픽 카드 취향 열쇠 둘 그대로
- 낡은 시험 고침(568_1 · 622_2 · 624_2 · 624_3 · 553_4 · 625_draw · b05_routeedit_initial · 626_3 · 390_4 · 346_2 · 353_1 · 581_2 · 584_1 · 584_3) — 표 꼴 row() · 호버 글 = 표 · 한 행 · 고르기 메뉴로 바뀐 글을 잡음 · 새 지킴 634_2

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

112 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", "스냅 간격"),
("expected-draw", "예정노선 변경"),
("expected-original", "예정노선 원본"),
("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:-4]:
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