Merge remote-tracking branch 'origin/sub_laptop_1' into main_laptop_1
# Conflicts: # B05_Profile/B05_Profile_UI_RouteEdit.ts
This commit is contained in:
@@ -76,9 +76,7 @@ def test_D03_긋기_고르기_메뉴_속성판_그대로_한_선():
|
||||
for fake in ("NO_POINTS", "epsg: () => 0", "addPoint: () => undefined", "oneLine"):
|
||||
assert fake not in ui, fake
|
||||
assert "if (!kit.key(event)) return;" in ui # 같은 단축키(키트)
|
||||
assert (
|
||||
'keyIs(event, "plan.undo") || keyIs(event, "plan.redo")' in ui
|
||||
) # 되돌리기 = 페이지 사진첩
|
||||
assert '? (step("undo"), true)' in ui # 켠 동안 Ctrl+Z = 이 판 사진첩(755-1)
|
||||
# 지도 입력 = 키트 한 함수 · 잡기 단계(capture) — 재기 · 계획선 고르기보다 먼저
|
||||
assert "capture: { active: () => open, busy: () => busy }," in ui
|
||||
assert "canvas.addEventListener(type, run, !!capture)" in kit
|
||||
@@ -99,7 +97,7 @@ def test_D03_긋기_고르기_메뉴_속성판_그대로_한_선():
|
||||
for src in (draw, menu, props):
|
||||
assert "oneLine" not in src
|
||||
table = _src(D03 / "D03_PlanAnalysis_UI_Features.ts")
|
||||
# 638-3 — 세트 칸 · 세트 줄 = B05 보기만 · [잇기] = B05 숨김 · 세트 고침 = assignSet 한 길
|
||||
# 638-3 — 세트 칸 · 세트 줄 = B05 보기만 · 세트 고침 = assignSet 한 길 · 755-1 [잇기] = B05 사용(끊긴 곳 이음)
|
||||
assert 'disabled: !params.editable() || !featureOn(page, "set")' in props
|
||||
assert 'featureOn(page, "join") && edit.isEnd(' in props + menu
|
||||
assert "setPiecesYear" not in props and "setLineYear" not in _src(
|
||||
@@ -109,7 +107,7 @@ def test_D03_긋기_고르기_메뉴_속성판_그대로_한_선():
|
||||
("branch", "hide"),
|
||||
("years", "view"),
|
||||
("set", "view"),
|
||||
("join", "hide"),
|
||||
("join", "use"),
|
||||
("points", "hide"),
|
||||
("draw", "use"),
|
||||
):
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
"""635-3 B05 왼쪽 「위치」 · 「그리기」 칸 · 「예정노선 수정」 · 받은 노선 비교 · [받은 노선으로] · 어둡게(요구 546).
|
||||
"""635-3 B05 왼쪽 「그리기」 칸(755-2 위치 칸 걷음) · 「예정노선 수정」 · 받은 노선 비교 · [받은 노선으로] · 어둡게(요구 546).
|
||||
|
||||
- 칸 = 예정노선 키트(`createPlanKit` 「b05」) 칸 · 자리 = `registerPanelSection` order 1 · 2(종단 보기) · 편집기가 채움.
|
||||
- 위치 = 찾기 → 지도 이동만(지형 받기 · 기준점 없음) · 고칠 선 = 받은 원본 꼭짓점(`GET /route/plan/source` · 635-2).
|
||||
- 칸 = 예정노선 키트(`createPlanKit` 「b05」) 칸 · 자리 = `registerPanelSection` order 1(종단 보기) · 편집기가 채움.
|
||||
- 위치 칸 = 기능 표 「site」 b05 숨김(589-8) · 고칠 선 = 받은 원본 꼭짓점(`GET /route/plan/source` · 635-2).
|
||||
- [받은 노선으로] = 받은 꼭짓점 다시 추적 + 초안 `expected` [](고친 예정노선 지움) — 한 걸음 · 페이지 [초기화] 그대로.
|
||||
- 켬 = 아래 계획노선 그림 불투명 `--draw-map-dim`(0.35) · 등고 높이값 · 예정노선 그림은 그대로.
|
||||
- 큰 파일 안 늘림(RouteEdit 683 · Render 648 + 10 안).
|
||||
- 큰 파일 안 늘림(RouteEdit 690 · Render 648 + 10 안).
|
||||
|
||||
./venv/Scripts/python.exe -m pytest resources/tester/test_635_3_b05_plan_panel.py -q
|
||||
"""
|
||||
@@ -22,10 +22,10 @@ def _src(path: Path) -> str:
|
||||
return path.read_text(encoding="utf-8")
|
||||
|
||||
|
||||
def test_왼쪽_칸_둘_종단_보기_위():
|
||||
def test_왼쪽_칸_하나_종단_보기_위():
|
||||
panel = _src(B05 / "B05_Profile_UI_Panel_Plan.ts")
|
||||
assert '["site", 1, "위치"]' in panel and '["draw", 2, "그리기"]' in panel
|
||||
assert 'views: ["profile"]' in panel and "id: `plan-${slot}`" in panel
|
||||
assert 'id: "plan-draw",' in panel and 'title: "그리기",' in panel and "order: 1," in panel
|
||||
assert 'views: ["profile"]' in panel and '"site"' not in panel and '위치"' not in panel
|
||||
assert "export function fillPlanPanel(" in panel
|
||||
assert "holder.hidden = !card;" in panel # 비면 자리 숨김
|
||||
# 다른 칸(구조물 배치 10 · 페이지 설정 20)보다 위
|
||||
@@ -33,18 +33,18 @@ def test_왼쪽_칸_둘_종단_보기_위():
|
||||
assert "order: 20" in _src(B05 / "B05_Profile_UI_Panel_Sections.ts")
|
||||
|
||||
|
||||
def test_키트_칸_위치_찾기_이동만_원본_꼭짓점():
|
||||
def test_키트_칸_위치_걷음_원본_꼭짓점():
|
||||
ui = _src(B05 / "B05_Profile_UI_ExpectedDraw.ts")
|
||||
body = ui.split("*/", 1)[1]
|
||||
assert 'page: "b05",' in body and "cards: { site: { parts: [find.root] } }," in body
|
||||
assert "fillPlanPanel({" in body and "createPlaceFind(" in body
|
||||
assert "coords.toPlan(hit.lon, hit.lat)" in body # 지도 이동만(서버 변환 · 635-5)
|
||||
assert 'page: "b05",' in body and "cards: {}," in body
|
||||
assert "fillPlanPanel(drawCard);" in body and "createPlaceFind" not in body
|
||||
assert "toPlan" not in body and "frame" not in body # 찾기 이동 걷음(589-8)
|
||||
for banned in ("createPlanTerrain", "ensureCovered", "createPlanSite", "createFloatPanel"):
|
||||
assert banned not in body, banned
|
||||
assert "/route/plan/source" in body and "expected_source" in body
|
||||
assert "shown === original ? received() : shown" in body # 안 고친 선 = 원본 꼭짓점
|
||||
features = _src(ROOT / "D03_PlanAnalysis" / "D03_PlanAnalysis_UI_Features.ts")
|
||||
assert re.search(r'key: "site",[^}]*b05: "use"', features)
|
||||
assert re.search(r'key: "site",[^}]*b05: "hide"', features, re.S)
|
||||
assert re.search(r'key: "terrain",[^}]*b05: "hide"', features, re.S)
|
||||
|
||||
|
||||
@@ -56,10 +56,10 @@ def test_수정_켬끔_받은_노선_비교_되돌림():
|
||||
assert "받은 노선 ${meters(received())} m → 고친 노선 ${meters(line())} m" in body
|
||||
assert 'label: "받은 노선으로"' in body and "follow(received(), [])" in body
|
||||
assert "resetButton.disabled = !edited || busy;" in body
|
||||
assert "if (!sameLine(points, base)) await follow(points, points);" in body
|
||||
assert "return sameLine(points, base) || (await follow(points, points));" in body # 끌 때 한 번
|
||||
main = _src(B05 / "B05_Profile_UI_RouteEdit.ts")
|
||||
assert "frame: () => ({ meta, setView: (next: ViewState) => (view = next) })," in main
|
||||
assert len(main.splitlines()) <= 683
|
||||
assert "frame:" not in main
|
||||
assert len(main.splitlines()) <= 690
|
||||
|
||||
|
||||
def test_켬_때_아래_노선_어둡게():
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"""635-5 B05 경위도 ↔ 사업지 좌표 서버 변환(요구 546) — 찾기 이동 · 속성 판 경위도.
|
||||
"""635-5 B05 경위도 ↔ 사업지 좌표 서버 변환(요구 546) — 속성 판 경위도(찾기 이동 = 755-2 걷음).
|
||||
|
||||
- 서버 `POST /route/coords` = 작업 좌표계(`resolve_project_crs` · WKT 그대로) pyproj 묶음 변환.
|
||||
- 화면 = 찾기 이동 · 노드 고름 때만 부름 · 같은 점 캐시 · 바탕 `tm_grid` 늘려 쓰기 걷음.
|
||||
- 화면 = 노드 고름 때만 부름 · 같은 점 캐시 · 바탕 `tm_grid` 늘려 쓰기 걷음.
|
||||
|
||||
./venv/Scripts/python.exe -m pytest resources/tester/test_635_5_b05_coords.py -q
|
||||
"""
|
||||
@@ -50,12 +50,12 @@ def test_라우터_등록():
|
||||
assert "resolve_project_crs(root, route_crs_input=" in router
|
||||
|
||||
|
||||
def test_화면_서버_변환_찾기_고름만():
|
||||
def test_화면_서버_변환_고름만():
|
||||
panel = (B05 / "B05_Profile_UI_Panel_Plan.ts").read_text(encoding="utf-8")
|
||||
assert "`/projects/${projectId}/route/coords`" in panel # requestJson 이 /api 를 붙임
|
||||
assert "known.has(key)" in panel # 같은 점 캐시
|
||||
ui = (B05 / "B05_Profile_UI_ExpectedDraw.ts").read_text(encoding="utf-8")
|
||||
assert "coords.toPlan(hit.lon, hit.lat)" in ui and "lonLat: coords.lonLat," in ui
|
||||
assert "lonLat: coords.lonLat," in ui and "toPlan" not in ui + panel
|
||||
assert "normOfLonLat" not in ui and "tm_grid` 늘려" not in ui
|
||||
# 끌기 중엔 판을 안 그림 — 속성 판은 고름 · 놓음(commit) 때만
|
||||
kit = (ROOT / "D03_PlanAnalysis" / "D03_PlanAnalysis_UI_Kit.ts").read_text(encoding="utf-8")
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
"""755 B05 평면 예정노선 수정 흐름(요구 589-1 · 3 · 5 · 6 · 7 · 8).
|
||||
|
||||
- 755-1 켠 동안 = 판만 고침 · 끊김 허용(가운데 묶음 지움) · 이 판 사진첩(Ctrl+Z · 도구줄 단추) ·
|
||||
끌 때 한 번 = 끊겼으면 알림하고 안 끔 · 바뀌었으면 `/route/follow` 한 걸음 · [잇기] = B05 사용.
|
||||
- 755-2 켠 동안 재기 = D03 재기 겹 · 받은 노선 = 분홍 점선 + 검은 테 · 켬 설명 걷음 · 위치 칸 걷음.
|
||||
|
||||
./venv/Scripts/python.exe -m pytest resources/tester/test_755_expected_flow.py -q
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
B05 = ROOT / "B05_Profile"
|
||||
D03 = ROOT / "D03_PlanAnalysis"
|
||||
|
||||
|
||||
def _body() -> str:
|
||||
return (B05 / "B05_Profile_UI_ExpectedDraw.ts").read_text("utf-8").split("*/", 1)[1]
|
||||
|
||||
|
||||
def _fn(body: str, head: str) -> str:
|
||||
start = body.index(head)
|
||||
end = body.index("\n }\n", start)
|
||||
return body[start:end]
|
||||
|
||||
|
||||
def test_켠_동안_판만_한_걸음_사진첩():
|
||||
body = _body().replace("\r\n", "\n")
|
||||
commit = _fn(body, "function commit(")
|
||||
assert "undoStack.push(network);" in commit and "redoStack = [];" in commit
|
||||
assert "follow(" not in commit and "apply(" not in commit # 켠 동안 평면선 안 바꿈
|
||||
assert "function apply(" not in body and "strokeBase" not in body
|
||||
assert "onMode: () => params.redraw()," in body # 긋기 끝 = 다시 추적 아님
|
||||
assert 'keyIs(event, "plan.undo")\n ? (step("undo"), true)' in body
|
||||
assert "history: () =>\n open" in body # 끔 = 페이지 사진첩
|
||||
history = (B05 / "B05_Profile_UI_RouteEdit_History.ts").read_text("utf-8")
|
||||
assert "const local = params.local?.();" in history
|
||||
assert "params.local?.() ?? getHistory()" in history
|
||||
main = (B05 / "B05_Profile_UI_RouteEdit.ts").read_text("utf-8")
|
||||
assert "local: () => expectedDraw.history()," in main
|
||||
assert "onHistory: () => historyControls.sync()," in main
|
||||
|
||||
|
||||
def test_끌_때_끊김_알림_안_끔_한_번_추적():
|
||||
body = _body().replace("\r\n", "\n")
|
||||
open_ = _fn(body, "async function setOpen(")
|
||||
assert "if (!next && open && !(await finish())) return toggle.set(true);" in open_
|
||||
finish = _fn(body, "async function finish(")
|
||||
assert "drawn.length > 1" in finish and "return false;" in finish and "showToast(" in finish
|
||||
assert "return sameLine(points, base) || (await follow(points, points));" in finish
|
||||
follow = _fn(body, "async function follow(")
|
||||
assert (
|
||||
"/route/follow" in follow
|
||||
and "return true;" in follow
|
||||
and "if (!ok) return false;" in follow
|
||||
)
|
||||
assert "revert" not in body # 실패 · 취소 = 판 그대로(켠 채)
|
||||
table = (D03 / "D03_PlanAnalysis_UI_Features.ts").read_text("utf-8")
|
||||
assert re.search(r'key: "join",[^}]*b05: "use"', table, re.S)
|
||||
assert re.search(r'key: "branch",[^}]*b05: "hide"', table, re.S) # 갈래 · 둘째 선 그대로 막음
|
||||
|
||||
|
||||
def test_재기_D03_겹_켠_동안():
|
||||
body = _body()
|
||||
assert "createPlanMeasure(" in body and "params.measuring()" in body
|
||||
assert "kit.layers([], [measure.layer])" in body and "layers: liveLayers," in body
|
||||
assert "idle: () => open && !measuring()," in body # 재는 동안 고르기 · 끌기 쉼
|
||||
main = (B05 / "B05_Profile_UI_RouteEdit.ts").read_text("utf-8")
|
||||
assert "measuring: () => measureControls.mode()," in main
|
||||
|
||||
|
||||
def test_받은_노선_색_설명_위치_걷음():
|
||||
body = _body()
|
||||
assert 'strokeCased(context, themeColor("--draw-map-route-3", "#ff8cbc"), 2.5, [8, 5]);' in body
|
||||
assert "--draw-text-secondary" not in body
|
||||
assert "HINT =" not in body.replace("OFF_HINT =", "") and "hint.hidden = open;" in body
|
||||
table = (D03 / "D03_PlanAnalysis_UI_Features.ts").read_text("utf-8")
|
||||
assert re.search(r'key: "site",[^}]*b05: "hide"', table, re.S)
|
||||
assert re.search(r'key: "site",[^}]*d03: "use"', table, re.S) # D03 그대로
|
||||
theme = (ROOT / "ui_template" / "ui_template_theme.css").read_text("utf-8")
|
||||
assert "--draw-map-route-3:" in theme
|
||||
Reference in New Issue
Block a user