- 좌측 패널 · 아래 단추 넷 · 종단도 · 구조물 배치 폼을 페이지에 한 번만 만듦(design_shared) — 두 보기가 같은 노드 - 보기는 가운데 위 칸만: 종단 보기 = 3D(design_view_profile) · 횡단 보기 = 횡단 카드(design_view_cross · 처음 보일 때 그림) - 옛 B05_Profile_UI_Page · B06_Section_UI_Page 삭제 · 한 벌이 받은 조작은 지금 보기로, 관 목록 · 횡단 재계산 알림은 두 보기 모두로 - 진행 단계 종단설계 · 횡단설계 두 칸이 보기를 따라 켜짐 · 누르면 주소만 바꿈 · 제목도 따라감(setTitle · setActiveStep) - [저장] · [확정] 한 벌 — 두 보기 몫을 모아 saveDesign 한 번 · 종단 보기 [확정] 켬(횡단 보기를 숨긴 채 세워 횡단 자료를 얻음) - [초기화] · 계획노선 편집은 같은 페이지라도 다시 세움(remountRoute) - 덧붙임: 방향키는 초점 있는 쪽만(조정창 ↔ 종단도 계획고) · 횡단 보기 계획고 편집에도 [3D 업데이트] 대기 표시 · 종단 보기 폼 관 옵션을 횡단 캐시에도 얹음 · 종단 보기에서 횡단 조정 칸 가림 - 나눔: Cross_View 756→658(_Cross_View_Frame) · Page_Structures_Panel 700→547(_Structures_Spec) · 옛 B05 Page 786 → design_view_profile 638(_Page_Latest · _Page_Stations) - 시험: test_design_view_parity 한 벌 기준(한 패널 · 보기 오가도 같은 노드) · page_single · profile_single · save_channels · save_recompute 등 옮긴 자리로 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KmELpdXFDRZHhfbGuRhSmL
78 lines
3.5 KiB
Python
78 lines
3.5 KiB
Python
"""B05·B06 유토곡선 일원화 소스 검사 (2026-09-03 사용자 지시).
|
||
|
||
같은 데이터를 두 화면에 보여 주는 기능이므로 ① 보는 노선 ② 횡단 재계산 창구
|
||
③ 낡음 판정 규칙이 한 벌이어야 한다. 실측으로 드러난 갈림:
|
||
· 노선 — B05 route 126(DRAFT) / B06 route 125(CONFIRMED), 20m 성토 4.82㎡ ↔ 85.9㎡
|
||
· 재계산 — B06만 표준 단면값·암 경계 오프셋을 실어 보냄, 절토 합 228.52㎡ ↔ 270.12㎡
|
||
"""
|
||
|
||
from pathlib import Path
|
||
|
||
ROOT = Path(__file__).resolve().parents[2]
|
||
|
||
|
||
def _read(relative: str) -> str:
|
||
return (ROOT / relative).read_text(encoding="utf-8")
|
||
|
||
|
||
REPO = _read("B06_Section/B06_Section_Repository.py")
|
||
B06_ROUTER = _read("B06_Section/B06_Section_Router.py")
|
||
REFRESH = _read("B06_Section/B06_Section_Cross_Refresh.ts")
|
||
B05_PREVIEW = _read("B05_Profile/B05_Profile_UI_Profile_Preview.ts")
|
||
# 설계 재계산 자리는 700줄 제한으로 `_UI_Page_Design_Sync` 로 떨어져 나갔다(2026-09-13).
|
||
B06_PAGE = _read("A00_Common/design/design_view_cross.ts") + _read(
|
||
"B06_Section/B06_Section_UI_Page_Design_Sync.ts"
|
||
)
|
||
|
||
|
||
def test_workflow_route_context_has_no_confirmed_filter():
|
||
"""화면이 보는 경로는 최신 경로 — 확정 여부로 거르지 않는다."""
|
||
assert "async def get_workflow_route_context" in REPO
|
||
assert "confirmed_only=False" in REPO
|
||
# 확정본만 보는 창구(B07 납품도면)는 그대로 남아 있어야 한다.
|
||
assert "async def get_confirmed_route_context" in REPO
|
||
assert "confirmed_only=True" in REPO
|
||
|
||
|
||
def test_b06_context_uses_workflow_route():
|
||
"""B06 화면 context는 B05와 같은 최신 경로를 돌려준다."""
|
||
# 2026-09-06 부터 이 읽기는 `asyncio.gather` 로 묶여 커넥션 인자가 사라졌다
|
||
# (`run_with_connection` 이 자기 커넥션을 넘긴다). 확인할 것은 **어느 창구를 쓰는가**다.
|
||
assert "get_workflow_route_context" in B06_ROUTER
|
||
assert "get_confirmed_route_context" not in B06_ROUTER
|
||
|
||
|
||
def test_cross_refresh_is_single_entry():
|
||
"""횡단 재계산은 한 창구뿐 — 두 화면이 같은 인자를 실어 보낸다."""
|
||
assert "export async function refreshCrossDesigns" in REFRESH
|
||
assert "readStandardCrossSession(projectId)" in REFRESH
|
||
assert "readRockBoundarySession(projectId, routeId)" in REFRESH
|
||
for source in (B05_PREVIEW, B06_PAGE):
|
||
assert "refreshCrossDesigns(" in source
|
||
assert "previewCrossDesigns(" not in source
|
||
|
||
|
||
def test_cross_refresh_preserves_user_fields():
|
||
"""서버 설계로 갈아 끼워도 화면 조작으로만 생기는 값은 살아남는다."""
|
||
for field in (
|
||
"inlet_structure",
|
||
"basin_adjust",
|
||
"revet_adjust",
|
||
"extra_wall_counts",
|
||
"extra_spans",
|
||
"revet_link_detached",
|
||
"revet_follow_grade",
|
||
):
|
||
assert f'"{field}"' in REFRESH # preserveUserFields 의 보존 필드 목록
|
||
|
||
|
||
def test_cross_refresh_lays_structure_areas_once():
|
||
"""구조물 폐회로 면적은 재계산 창구 **한 자리**에서 얹는다(계획서 24-2a).
|
||
|
||
부르는 쪽(B05 프리뷰 · B06 설계 맞춤)마다 얹으면 B06 흐름만 얹고 B05 는 안 얹어 두 보기의
|
||
유토 뱃지가 갈렸다(실측 B05 −14,144.5 · B06 −12,533.2㎥)."""
|
||
body = REFRESH[REFRESH.index("export async function refreshCrossDesigns") :]
|
||
body = body[: body.index("\n}\n")]
|
||
assert "applyStructureAreaRows(" in body and "structureAreaRows(" in body
|
||
assert "applyStructureAreaRows(" not in B05_PREVIEW
|