Merge remote-tracking branches 'origin/sub_laptop_2' and 'origin/sub_laptop_5' into main_laptop_1

This commit is contained in:
2026-10-27 20:10:20 +09:00
4 changed files with 61 additions and 24 deletions
+27
View File
@@ -0,0 +1,27 @@
"""560-4 D 단계 이동 = 저장 뒤 이동 지킴 시험 — 서버 · 화면 없이 소스만 본다.
단계 아이콘 · [<] [>] · 머리 메뉴 · 뒤로가 한 함수(beforeLeave)를 거치고 · D02 첫 불러오기 실패에도 지도를 세움."""
import re
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
def _src(path: str) -> str:
return (ROOT / path).read_text(encoding="utf-8")
def test_group_step_waits_before_leave():
ts = _src("A00_Common/group_workflow.ts")
assert "beforeLeave?: () => Promise<boolean>" in ts
assert "setLeaveGuard(" in ts # 머리 메뉴 · 뒤로
assert "leave().then((ok) => ok && navigateTo(" in ts # 단계 아이콘 · [<] [>]
def test_d02_leave_saves_and_builds_map_on_fail():
ts = _src("D02_PlanBase/D02_PlanBase_UI_Page.ts")
assert "beforeLeave:" in ts and "ui-step-nav" not in ts # 따로 듣개 없음
tail = ts[ts.rindex(" try {") :]
# 불러오기 catch 뒤에 paint() — 실패해도 지도 · 표를 세움
assert re.search(r"\} catch \(error\) \{[^}]*\}\s*active = firstEmpty\(\);\s*paint\(\);", tail)
assert "sameBase" in ts # 옛 캐시는 그때 서버 값이 지금과 같을 때만
-2
View File
@@ -121,8 +121,6 @@ def fake_3d(tmp_path, monkeypatch):
monkeypatch.setattr(e04, "_source_root", lambda root: root)
monkeypatch.setattr(source, "stations", lambda src: STATIONS)
monkeypatch.setattr(e04, "_current_fingerprint", lambda *a: "fp")
# 564-2 열쇠 꼴(조건 들어감) — 그 전 판에서도 시험이 돌게 가짜로
monkeypatch.setattr(run3d, "section_key", lambda s, e, c="dry": f"{s:.2f}_{e:.2f}_{c}")
monkeypatch.setattr(
run3d, "load", lambda root, key: {"fingerprint": "fp"} if key in fresh else None
)