- 시험: test_345_5_plan_full_overlay 3(전체 영역 · 뜬 판 · 띠 없음 · 종단 그래프 있음) · test_345_3 판 시험 고쳐 씀 · 관련 162 통과 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Se7ytqbohmBQnfYpwYFnYf
71 lines
3.2 KiB
Python
71 lines
3.2 KiB
Python
"""345-5 사용자 의견(요구 233) — 종단 보기 평면 = 가운데 전체 영역 · 아래 종단 판 = 뜬 판 ·
|
|
노선 편집 안 「원지반선 · 계획 종단선」 띠 없음 · 아래 종단 판 종단 그래프는 그대로.
|
|
|
|
꼴은 글로 봄(화면 확인은 브레인).
|
|
./venv/Scripts/python.exe -m pytest resources/tester/test_345_5_plan_full_overlay.py -q
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import re
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
|
|
|
|
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)
|
|
|
|
|
|
def test_평면은_가운데_전체_영역():
|
|
page = _read("A00_Common/design/design_page.css")
|
|
main = _block(page, ".design-page__main")
|
|
assert "position: relative;" in main and "height: 100%;" in main
|
|
assert "flex: 1 1 auto;" in _block(page, ".design-page__center")
|
|
# 종단 보기에서 판을 흐름에 세우는 규칙 없음 — 가운데가 위아래 끝까지
|
|
flow = re.findall(r"^(\.design-page__main[^{\n]*\.b05-route-profile) \{", page, re.M)
|
|
assert flow == [
|
|
'.design-page__main[data-view="cross"] > .design-page__profile > .b05-route-profile'
|
|
]
|
|
route = _read("B05_Profile/B05_Profile_UI_Style_RouteEdit.css")
|
|
assert "flex: 1 1 auto;" in _block(route, ".b05-routeedit")
|
|
assert "flex: 1 1 auto;" in _block(route, ".b05-routeedit__canvas-wrap")
|
|
# 캔버스 크기 = 칸 크기(ResizeObserver) · 평면은 가운데 칸에 붙음
|
|
editor = _read("B05_Profile/B05_Profile_UI_RouteEdit.ts")
|
|
assert "new ResizeObserver(() => resize())" in editor
|
|
assert (
|
|
'sizeWatch.observe(overlay.querySelector<HTMLElement>(".b05-routeedit__canvas-wrap")!)'
|
|
in editor
|
|
)
|
|
view = _read("A00_Common/design/design_view_profile.ts")
|
|
assert "center.append(mainContent);" in view
|
|
assert "mountRouteEditor(mainContent, host, activeProjectId, rebuildAfterReplan," in view
|
|
|
|
|
|
def test_종단_판은_평면_위_뜬_판():
|
|
style = _read("B05_Profile/B05_Profile_UI_Style.css")
|
|
panel = _block(style, ".b05-route-profile")
|
|
for line in ("position: absolute;", "z-index: 3;", "bottom: 0;", "left: 0;", "right: 0;"):
|
|
assert line in panel
|
|
# 끌어 높이 · 접기 · 새 창 떼기 그대로
|
|
assert "height: var(--b05-profile-height, 60dvh);" in panel
|
|
assert ".b05-route-profile.is-collapsed > .ui-resizer" in style
|
|
page = _read("A00_Common/design/design_page.css")
|
|
assert "position: relative;" in _block(page, ".b05-route-profile.is-popout")
|
|
|
|
|
|
def test_띠_없음_종단_그래프_있음():
|
|
chrome = _read("B05_Profile/B05_Profile_UI_RouteEdit_Chrome.ts")
|
|
assert "data-strip" not in chrome
|
|
assert not (ROOT / "B05_Profile/B05_Profile_UI_RouteEdit_ProfileStrip.ts").exists()
|
|
# 아래 종단 판(종단 그래프 · 표 · 유토곡선)은 그대로 세움
|
|
view = _read("A00_Common/design/design_view_profile.ts")
|
|
assert "const profilePanel = createRouteProfilePanel(" in view
|
|
assert (ROOT / "B05_Profile/B05_Profile_UI_Profile_Panel.ts").exists()
|