- B06 [>] · 단계 판 B07~B09 = moveStage 한 단계(설계 확정) · progress = GET /design/save/progress 1 s 물음 · B03 · B04 로 = moveStage 잠금 길(떠남 확인은 잠금 풀린 뒤) - 낡음 확인 창 · 화면 side.update() 걷음 — 배수유역은 서버 [확정] 관 차례가 한 번만 셈 · 진행 이름 「배수유역 다시 셈」(basins) - 서버 _run_steps step() 진행을 메모리(B06_Section_Router_DesignSave_Progress) · 차례 목록 = N · 끝에 비움 - 노선 바뀐 채 [>] = 물음(잠금판 위 · z 1050 > 900) → 다시 세운 페이지 둘째 확정을 저장 줄 밖에서 기다림 → 잠금판이 다시 마운트를 넘어 이어져 이동 · 120 s 넘으면 머묾 - saveSharedDesign 이 참 · 거짓을 돌려줌 · 확정 이동은 부른 쪽(moveStage) - 낡은 시험 고침 — 512_2(확인 창 → 잠금판 한 단계 · 서버 basins) · 298_3 · 272 · b06_save_channels · b06_save_recompute(글 약속 새 길) - helper_ts_stub_loader .css = 빈 모듈 — 520-3 ui_template_progress.css import 로 451 · 384_4 · 416 등 helper 시험이 깨짐(브레인 승인) - 새 시험 test_520_4_save_progress(n/N · 배수유역 자리) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
68 lines
3.5 KiB
Python
68 lines
3.5 KiB
Python
"""512-2(요구 326-6) 배수유역도 [업데이트] — 점선 원 · 단추 셋 걷음 · 노선선 = 답의 노선 · B06 [>] 확인 창.
|
|
|
|
- 서버 답 `route_xy` = 그 답을 셈한 노선(사업지 m) — 화면 노선선 · 관 자리 · 유역이 늘 짝
|
|
(초안 노선 [업데이트] 뒤 저장 노선을 그려 생기던 「노선 곁 빈 곳」).
|
|
- 낡은 답(세부 유역 없음)이 와도 그림이 있으면 옛 그림 그대로 · 관만 받음.
|
|
- 흐름(낡음 · 늘 다시 셈 · 저절로 셈 없음)은 test_349 · 화면 실측은 PLAN 512-2.
|
|
"""
|
|
|
|
from pathlib import Path
|
|
from uuid import uuid4
|
|
|
|
from B04_PreProcess import B04_PreProcess_Router_Basins as basins
|
|
from common_util.common_util_drainage_context import DrainageContext
|
|
from common_util.common_util_drainage_detail import DrainageDetail, pipes_from_chainages
|
|
from common_util.common_util_route_geometry import RouteVertex
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
B05 = ROOT / "B05_Profile"
|
|
|
|
|
|
def _read(path: Path) -> str:
|
|
return path.read_text(encoding="utf-8")
|
|
|
|
|
|
def test_답에_셈한_노선이_실림():
|
|
vertices = [RouteVertex(10.0, 20.0, 100.0, 0.0), RouteVertex(310.1234, 20.0, 90.0, 300.1234)]
|
|
context = DrainageContext(stored_path="x", project_root=ROOT, vertices=vertices)
|
|
detail = DrainageDetail(route_lonlat=[], pipes=pipes_from_chainages(vertices, [100.0]))
|
|
points = basins.carry_facility_attributes(basins._rebuilt(detail), [])
|
|
payload = basins._payload(uuid4(), context, detail, points, False)
|
|
assert payload["route_xy"] == [[10.0, 20.0], [310.123, 20.0]]
|
|
|
|
|
|
def test_단추는_업데이트_자동제안_둘():
|
|
chrome = _read(B05 / "B05_Profile_UI_Drainage_Chrome.ts")
|
|
assert "header.append(updateButton, proposeButton);" in chrome
|
|
for gone in ("analyzeButton", "deleteButton", "autoButton"):
|
|
assert gone not in chrome
|
|
locale = _read(ROOT / "ui_template" / "ui_template_locale_b2.ts")
|
|
assert "B05_Drainage_Btn_Auto:" not in locale and "B05_Drainage_Btn_Analyze" not in locale
|
|
|
|
|
|
def test_점선_원_없음():
|
|
render = _read(B05 / "B05_Profile_UI_Drainage_Render.ts")
|
|
assert "candidates" not in render and "setLineDash" not in render
|
|
assert "candidates" not in _read(B05 / "B05_Profile_UI_Drainage_Propose.ts")
|
|
|
|
|
|
def test_노선선은_답의_노선_낡은_답은_옛_그림():
|
|
panel = _read(B05 / "B05_Profile_UI_Drainage_Panel.ts")
|
|
apply = panel[panel.index("function apply(") : panel.index("function takePipes(")]
|
|
assert apply.index("if (keep) return void takePipes(response);") < apply.index("basins = ")
|
|
assert "const keep = !!response.stale && basins.length > 0;" in apply
|
|
assert "takeRoute(answered, false)" in apply
|
|
assert "if (!routeFromAnswer) takeRoute(points, true);" in panel # 페이지 노선 = 첫 답 전만
|
|
|
|
|
|
def test_B06_다음은_잠금판_한_단계_배수유역은_서버가_한_번():
|
|
# 520-4 — 낡음 확인 창 · 화면 [업데이트] 없앰 · 서버 [확정] 관 차례가 한 번 다시 셈(진행 이름 basins)
|
|
shared = _read(ROOT / "A00_Common" / "design" / "design_shared.ts")
|
|
go = shared[shared.index("export function confirmAndGo(") :]
|
|
go = go[: go.index("\n}\n")]
|
|
assert "moveStage(id, route, [" in go and "progress: () => designSaveProgress(id)" in go
|
|
assert "drainageFirst" not in shared and "side.update()" not in go
|
|
save = _read(ROOT / "B06_Section" / "B06_Section_Router_DesignSave.py")
|
|
assert "basins = request.confirm and await _stale_or_false(_analysis_stale, project_id)" in save
|
|
assert '"basins" if basins else None' in save
|