Merge remote-tracking branches 'origin/main_laptop_1' and 'origin/sub_laptop_6' into sub_laptop_3
This commit is contained in:
@@ -67,6 +67,7 @@ function makeLoader({
|
||||
if (useCache && cache.has(full)) return cache.get(full);
|
||||
const stub = fileStub && fileStub(full);
|
||||
if (stub) return stub;
|
||||
if (full.endsWith(".css")) return {}; // 화면 글꼴 import(ui_template_progress.css 등) — 트랜스파일 못 함
|
||||
if (full.endsWith(".json")) {
|
||||
const data = JSON.parse(fs.readFileSync(full, "utf8"));
|
||||
if (useCache) cache.set(full, data);
|
||||
|
||||
@@ -115,7 +115,8 @@ def test_화면_선만_바뀌면_낡음_다시_셈() -> None:
|
||||
|
||||
def test_확정_성공도_상세_비움() -> None:
|
||||
# 470 N1 — [확정] 은 다음 페이지(B07)로 바로 감 · [저장]처럼 상세 메모리 · 옛 세션 사본을 비움
|
||||
# (이동은 잠금판 `moveStage` 가 · 520-4)
|
||||
shared = (ROOT / "A00_Common/design/design_shared.ts").read_text(encoding="utf-8")
|
||||
done = shared[shared.index(" done: async (isConfirm, reload = true) => {") :]
|
||||
confirm = done[done.index("if (isConfirm) {") : done.index("goToWorkflowStage(")]
|
||||
confirm = done[done.index("if (isConfirm) {") : done.index('L("B06_Profile_Confirm_Success")')]
|
||||
assert "invalidateSectionDetail(shared.projectId);" in confirm
|
||||
|
||||
@@ -97,15 +97,11 @@ def test_3_고친_것_없고_단계_완료면_바로_이동():
|
||||
assert 's.state === "COMPLETE"' in fn and "done(2) && !!done(3)" in fn
|
||||
go = shared[shared.index("export function confirmAndGo(") :]
|
||||
go = go[: go.index("\n}\n")]
|
||||
assert (
|
||||
"skip ? goToWorkflowStage(shared.projectId, route) : saveSharedDesign(shared, true, route)"
|
||||
in go
|
||||
)
|
||||
# 잠금판 한 단계 — 확정됐으면 저장 없이 이동(520-4 moveStage)
|
||||
assert "run: async () => (await alreadyConfirmed(id)) || saveSharedDesign(shared, true)," in go
|
||||
# 줄 세움 = [저장] · 확정 한 곳
|
||||
assert (
|
||||
"await queueDesignSave(shared.projectId, confirm, () => saveOnce(shared, confirm, target));"
|
||||
in shared
|
||||
)
|
||||
assert "await queueDesignSave(shared.projectId, confirm, () =>" in shared
|
||||
assert "saveOnce(shared, confirm, moved)," in shared
|
||||
|
||||
|
||||
def test_결과_한_줄_걷음():
|
||||
|
||||
@@ -55,14 +55,13 @@ def test_노선선은_답의_노선_낡은_답은_옛_그림():
|
||||
assert "if (!routeFromAnswer) takeRoute(points, true);" in panel # 페이지 노선 = 첫 답 전만
|
||||
|
||||
|
||||
def test_B06_다음은_낡으면_확인_뒤_업데이트():
|
||||
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", go.index("async function drainageFirst("))]
|
||||
assert "void drainageFirst(shared).then((ready) => (ready ? go() : undefined));" in go
|
||||
first = go[go.index("async function drainageFirst(") :]
|
||||
assert (
|
||||
first.index("side?.stale()")
|
||||
< first.index("showConfirmDialog(")
|
||||
< first.index("side.update()")
|
||||
)
|
||||
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
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""520-4 — B05 · B06 한 본문 저장 진행(잠금판 「n/N 차례 이름」) 메모리 기록 · 배수유역 다시 셈 자리."""
|
||||
|
||||
from uuid import uuid4
|
||||
|
||||
from B06_Section import B06_Section_Router_DesignSave_Progress as progress
|
||||
|
||||
|
||||
def test_차례_n_N_과_배수유역_자리() -> None:
|
||||
pid = uuid4()
|
||||
assert progress.snapshot(pid) == {"active": False}
|
||||
progress.begin(pid, ["settings", "pipes", "structures", "cross"])
|
||||
assert progress.snapshot(pid) == {"active": False} # 첫 차례 전
|
||||
progress.mark(pid, "basins")
|
||||
now = progress.snapshot(pid)
|
||||
assert (now["step"], now["index"], now["total"]) == ("basins", 2, 4) # 관 차례 자리
|
||||
progress.mark(pid, "cross")
|
||||
assert progress.snapshot(pid)["index"] == 4
|
||||
progress.mark(pid, "stages") # 목록 밖 = 끝 자리
|
||||
assert progress.snapshot(pid)["index"] == 4
|
||||
progress.end(pid)
|
||||
assert progress.snapshot(pid) == {"active": False}
|
||||
@@ -92,9 +92,9 @@ def test_두_페이지가_저장_한_줄기를_탄다():
|
||||
shared = (ROOT / "A00_Common" / "design" / "design_shared.ts").read_text(encoding="utf-8")
|
||||
actions = (ROOT / "B05_Profile" / "B05_Profile_UI_Page_Actions.ts").read_text(encoding="utf-8")
|
||||
persist = (ROOT / "B06_Section" / "B06_Section_UI_Page_Persist.ts").read_text(encoding="utf-8")
|
||||
assert shared.count("await saveDesign(") == 1, "저장 한 줄기를 한 자리에서만 부름"
|
||||
assert shared.count(" saveDesign(") == 1, "저장 한 줄기를 한 자리에서만 부름"
|
||||
page = (ROOT / "A00_Common" / "design" / "design_page.ts").read_text(encoding="utf-8")
|
||||
assert "saveSharedDesign(shared, true, route)" in shared, "확정(B06 [>])이 한 줄기를 안 탐"
|
||||
assert "saveSharedDesign(shared, true)" in shared, "확정(B06 [>])이 한 줄기를 안 탐"
|
||||
assert "confirmAndGo(shared, route)" in page, "B06 [>] · 단계 판 B07~B09 가 확정을 안 탐(496-1)"
|
||||
assert 'await shared.ensureView("cross")' in shared, "종단 보기 [확정]이 횡단 자료를 못 얻음"
|
||||
for name, text in (("종단 보기", actions), ("횡단 보기", persist), ("한 벌", shared)):
|
||||
|
||||
@@ -35,7 +35,9 @@ def test_저장이_면적을_모으기_전에_다시_계산한다() -> None:
|
||||
assert "collectSectionEdits(ctx)" in body[body.index("crossPart:") :], (
|
||||
"면적 수집이 횡단 조각 밖"
|
||||
)
|
||||
shared = _body(SHARED.read_text(encoding="utf-8"), "export async function saveSharedDesign")
|
||||
shared = _body(
|
||||
SHARED.read_text(encoding="utf-8"), "export async function saveSharedDesign", 2000
|
||||
)
|
||||
assert "prepare: crossSave?.prepare" in shared, "한 벌이 재계산을 저장 한 줄기에 안 넘긴다"
|
||||
save = SAVE.read_text(encoding="utf-8")
|
||||
# 472-6 — [저장] = 한 본문(`saveDesign` · 노선 바뀜도) · 재계산 뒤에 횡단 조각을 모음
|
||||
|
||||
Reference in New Issue
Block a user