- 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>
95 lines
3.2 KiB
Python
95 lines
3.2 KiB
Python
"""568-1 지도 도구줄 부품 지킴 시험 — 화면 확인은 부품 모음(`#/b01-account?view=ui-kit`) · ORCA.
|
|
|
|
· 단추 목록의 아이콘이 모두 아이콘 묶음에 있음 · 새 아이콘 여덟(도구 넷 · 겹 넷)
|
|
· 켬끔 단추 = aria-pressed · [?] = data-act="hint-toggle" + aria-expanded · 안내 판 기본 접힘
|
|
./venv/Scripts/python.exe -m pytest resources/tester/test_568_1_map_tools.py -q
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import re
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
UI = ROOT / "ui_template"
|
|
TS = (UI / "ui_template_map_tools.ts").read_text(encoding="utf-8")
|
|
ICONS = (UI / "ui_template_icons.ts").read_text(encoding="utf-8")
|
|
CSS = (UI / "ui_template_map_tools.css").read_text(encoding="utf-8")
|
|
|
|
|
|
def _icon_names() -> set[str]:
|
|
body = ICONS[ICONS.index("const PATHS") : ICONS.index("} as const")]
|
|
return set(re.findall(r"^ (\w+):", body, re.M))
|
|
|
|
|
|
def test_새_아이콘_여덟():
|
|
names = _icon_names()
|
|
for n in (
|
|
"ripple",
|
|
"tallymarks",
|
|
"percentage",
|
|
"magnet",
|
|
"satellite",
|
|
"droplet",
|
|
"borderAll",
|
|
"angle",
|
|
):
|
|
assert n in names, n
|
|
|
|
|
|
def test_단추_목록_아이콘_차례():
|
|
table = TS[TS.index("export const MAP_TOOLS") : TS.index("satisfies")]
|
|
rows = re.findall(
|
|
r'^ "?([\w-]+)"?: \{ icon: "(\w+)", title: "[^"]+"(, toggle: true)? \}', table, re.M
|
|
)
|
|
acts = [a for a, _, _ in rows]
|
|
assert acts == [
|
|
"undo",
|
|
"redo",
|
|
"view3d",
|
|
"rotate-ccw",
|
|
"rotate-cw",
|
|
"contour-minor",
|
|
"stations",
|
|
"slopes",
|
|
"footprint",
|
|
"measure",
|
|
"station-snap",
|
|
]
|
|
names = _icon_names()
|
|
assert all(icon in names for _, icon, _ in rows)
|
|
toggles = {a for a, _, t in rows if t}
|
|
assert toggles == {
|
|
"contour-minor",
|
|
"stations",
|
|
"slopes",
|
|
"footprint",
|
|
"measure",
|
|
"station-snap",
|
|
}
|
|
|
|
|
|
def test_켬끔_안내_판():
|
|
assert "pressed: tool.toggle ? (opts.pressed ?? false) : undefined" in TS
|
|
assert "button.dataset.act = act;" in TS
|
|
assert 'toggle.dataset.act = "hint-toggle";' in TS
|
|
assert 'toggle.setAttribute("aria-expanded", String(open));' in TS
|
|
assert "setOpen(opts.hint.open ?? false);" in TS # 기본 접힘
|
|
hint = CSS[CSS.index(".ui-map-tools__hint {") :]
|
|
assert "display: none;" in hint[: hint.index("}")]
|
|
assert "display: grid;" in CSS[CSS.index(".ui-map-tools__hint.is-open {") :]
|
|
assert "pointer-events: none;" in CSS # 빈 자리 · 글판은 지도 조작 통과
|
|
|
|
|
|
def test_571_1_한_줄_가로_밀기():
|
|
bar = CSS[CSS.index(".ui-map-tools > .ui-toolbar {") :]
|
|
bar = bar[: bar.index("}")]
|
|
assert "flex-wrap: nowrap;" in bar # 줄바꿈 없음
|
|
assert "overflow-x: auto;" in bar # 밀기 칸
|
|
assert "scrollbar-width: none;" in bar
|
|
assert "mask-image" in bar # 넘친 끝 흐림
|
|
assert ".ui-toolbar.is-more-end" in CSS and ".ui-toolbar.is-more-start" in CSS
|
|
assert "flex-shrink: 0;" in CSS # 단추가 찌그러지지 않음
|
|
assert "watchOverflow(bar);" in TS
|
|
assert '"wheel"' in TS and "passive: false" in TS # 휠 = 가로 밀기
|