- 새 key_registry.ts — 화면마다 받는 키 · 마우스 동작 한 벌 · keyIs(evt, id) · 바꾼 키만 input-prefs.keys - ☰ [설정] CAD 탭 = 찾기 칸 + 「키 · 마우스」 + 리본 탭 › 패널 접이 묶음(기타 여섯) · 날 input → 부품 입력 - 다른 곳 탭 = 손글 안내 지우고 등록부 표(B05 방향키 · D03 Delete 등 빠진 것 포함) · 찾기 - 키 기록 칸 · 줄마다 [기본값] · [모두 기본값] · 같은 화면 · 모든 화면 겹침 · 브라우저 몫 · CAD 글자 단독은 저장 막음 - 배선: B05 되돌림 · 자유지정 Enter · Backspace · D03 되돌림 · 그리기 · 지움(한글 자판도 자판 자리) · CAD F3 · F7 · F8 · F10 · Ctrl 명령 · Delete - 낡은 글 대조 시험 셋(215-1 · 345-3 · 346-4)은 새 배선 글로 고침 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
82 lines
3.1 KiB
Python
82 lines
3.1 KiB
Python
"""345-3 노선 편집 → 종단 보기 가운데 위 본문 — Ctrl+Z · Y 는 마지막에 만진 판 하나 · 종단도 판 흐름 배치 ·
|
|
왼쪽 「계획노선」 칸 · 편집 단추 지움 · [노선 반영] 뒤 새로고침 없이 다시 세움.
|
|
|
|
Ctrl+Z 몫은 Node 헬퍼 `helper_345_3_undo_owner.cjs` 가 진짜 `_RouteEdit_History` 로 돌림(346-4) ·
|
|
배선 · CSS 는 글로 봄(화면 확인은 브레인).
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import json
|
|
import re
|
|
import subprocess
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
HERE = Path(__file__).resolve().parent
|
|
ROOT = HERE.parents[1]
|
|
|
|
|
|
def _read(rel: str) -> str:
|
|
return (ROOT / rel).read_text(encoding="utf-8")
|
|
|
|
|
|
def _block(css: str, selector: str) -> str:
|
|
found = re.search(rf"^{re.escape(selector)} \{{([^}}]*)\}}", css, re.M)
|
|
assert found, selector
|
|
return found.group(1)
|
|
|
|
|
|
@pytest.fixture(scope="module")
|
|
def out() -> dict:
|
|
run = subprocess.run(
|
|
["node", str(HERE / "helper_345_3_undo_owner.cjs")],
|
|
capture_output=True,
|
|
text=True,
|
|
encoding="utf-8",
|
|
check=True,
|
|
)
|
|
return json.loads(run.stdout)
|
|
|
|
|
|
def test_Ctrl_Z_는_사진첩_한_줄(out):
|
|
# 346-4 — 「마지막에 만진 판 하나」 없앰 · 평면 편집기는 단축키를 안 들음(종단도가 사진첩으로)
|
|
assert out["plan"] == [] and out["keydownListeners"] == 0
|
|
|
|
|
|
def test_종단도_Ctrl_Z_줄이_사진첩_하나():
|
|
tools = _read("B05_Profile/B05_Profile_UI_Profile_Panel_Tools.ts")
|
|
at = tools.index('if (redo || keyIs(event, "b05.undo")) {') # 588-3 등록부
|
|
assert (
|
|
"undoOwner" not in tools and "history.undo()" in tools[at : at + 600]
|
|
) # 367-3 자유지정 분기 앞에 섬
|
|
history = _read("B05_Profile/B05_Profile_UI_RouteEdit_History.ts")
|
|
assert '"keydown"' not in history and "onPageHistory" in history
|
|
|
|
|
|
def test_편집기는_본문_페이지_수명():
|
|
view = _read("A00_Common/design/design_view_profile.ts")
|
|
assert "mountRouteEditor(mainContent, host, activeProjectId, rebuildAfterReplan," in view
|
|
assert "tools: [view3d.modal.button]," in view
|
|
assert "openRouteEditModal" not in view and "location.reload()" not in view
|
|
assert len(view.splitlines()) <= 700
|
|
|
|
|
|
def test_종단도_판은_횡단_보기만_흐름():
|
|
"""345-5 — 종단 보기는 다시 뜬 판(평면 위 오버레이) · 횡단 보기만 흐름."""
|
|
css = _read("A00_Common/design/design_page.css")
|
|
rule = _block(
|
|
css, '.design-page__main[data-view="cross"] > .design-page__profile > .b05-route-profile'
|
|
)
|
|
assert "position: relative;" in rule and "flex: none;" in rule
|
|
assert "\n.design-page__main > .design-page__profile > .b05-route-profile" not in css
|
|
|
|
|
|
def test_계획노선_칸_편집_단추_지움():
|
|
sections = _read("B05_Profile/B05_Profile_UI_Panel_Sections.ts")
|
|
assert '"planned-route"' not in sections and "plannedRouteButton" not in sections
|
|
panel = _read("B05_Profile/B05_Profile_UI_Panel.ts")
|
|
assert "onEditPlannedRoute" not in panel and "createRoutePart" not in panel
|
|
assert not (ROOT / "B05_Profile/B05_Profile_UI_Panel_Route.ts").exists()
|