diff --git a/resources/tester/test_126_ford_right_click.py b/resources/tester/test_126_ford_right_click.py index cdfff91e9..4be5a8a71 100644 --- a/resources/tester/test_126_ford_right_click.py +++ b/resources/tester/test_126_ford_right_click.py @@ -87,13 +87,14 @@ def test_관이_사라지거나_종류가_바뀌면_그만_기다림(out): def test_배수유역_패널_배선(): src = _read("B05_Profile", "B05_Profile_UI_Drainage_Panel.ts") - # 최신 응답만 채택 - run = src[src.index("async function run(") : src.index("/** 지금 관 목록")] + # 최신 응답만 채택 — 요청 감싸기는 347-2 에 `B05_Profile_UI_Drainage_Run.ts` 로 나눔 + runner = _read("B05_Profile", "B05_Profile_UI_Drainage_Run.ts") + run = runner[runner.index("async run(") :] assert "const seq = ++requestSeq;" in run - assert run.index("await request()") < run.index("if (seq !== requestSeq) return;") - assert run.index("if (seq !== requestSeq) return;") < run.index("apply(response)") + assert run.index("await request()") < run.index("if (seq !== requestSeq) return false;") + assert run.index("if (seq !== requestSeq) return false;") < run.index("deps.apply(response)") # 채움은 보관소가 응답을 받기 전에 · 채웠으면 세션 초안에 다시 담음 - apply = src[src.index("function apply(") : src.index("async function run(")] + apply = src[src.index("function apply(") : src.index("const runner = createDetailRunner(")] order = [ apply.index("fillFordHeights(response.pipe_points, response.basins, fordWaits())"), apply.index("facilityStore.replaceFromResponse(response.pipe_points)"), diff --git a/resources/tester/test_298_add_reanalyze.py b/resources/tester/test_298_add_reanalyze.py index 8fcfe4b8b..0e6d99d7e 100644 --- a/resources/tester/test_298_add_reanalyze.py +++ b/resources/tester/test_298_add_reanalyze.py @@ -40,6 +40,8 @@ def out(): PANEL = _read("B05_Profile", "B05_Profile_UI_Drainage_Panel.ts") +# 세부유역 요청 감싸기 — 347-2 에 판에서 나눔(`createDetailRunner` · 판이 `label` · `apply` 넘김) +RUN = _read("B05_Profile", "B05_Profile_UI_Drainage_Run.ts") B06 = _read("B06_Section", "B06_Section_UI_Page_Structures_Panel.ts") CROSS = _read("A00_Common", "design", "design_view_cross.ts") @@ -72,7 +74,7 @@ def test_B06_추가_순간_기다림_적고_초안_씀(): def test_판은_같은_표로_채움(): assert "const fordWaits = () => fordWaitsOf(projectId);" in PANEL - assert "new Set()" not in _body(PANEL, "let requestSeq = 0;", "let canvasWidth") + assert "new Set()" not in _body(PANEL, "let loadSequence = 0;", "let canvasWidth") def test_채운_높이를_B06_목록_폼이_받음(): @@ -107,7 +109,7 @@ def test_다시_나눔은_세션_초안으로_계산만_저장_안_함(): assert "computeDetailBasins(projectId as string, pending)" in load analyze = _body(PANEL, "const analyze = ", "analyzeButton.addEventListener") assert "computeDetailBasins(" in analyze - run = _body(PANEL, "async function run(", "/** 지금 관 목록") + run = RUN[RUN.index("async run(") :] assert "saveDetailPipePoints" not in run + load + analyze # B05 [추가] = 판 addPipe → 배치 바뀜 → 초안 + 다시 나눔 commit = _body(PANEL, "const pipeEditor = createPipeEditor(", "(fromM, toM) =>") @@ -115,21 +117,24 @@ def test_다시_나눔은_세션_초안으로_계산만_저장_안_함(): def test_최신_응답만_잠금_없이_지도_칸_표시(): - run = _body(PANEL, "async function run(", "/** 지금 관 목록") + run = RUN[RUN.index("async run(") :] assert "const seq = ++requestSeq;" in run - assert run.index("if (seq !== requestSeq) return;") < run.index("apply(response)") + assert run.index("if (seq !== requestSeq) return false;") < run.index("deps.apply(response)") # 지도 칸 안 작은 표시(문구 · 지도 가운데 서클)만 — 화면 전체 잠금 없음 - assert 'status.textContent = L("B05_Drainage_Status_Analyzing");' in run - assert 'showProgress(null, L("B05_Drainage_Status_Analyzing"));' in run + assert 'status.textContent = label("B05_Drainage_Status_Analyzing");' in run + assert 'showProgress(null, label("B05_Drainage_Status_Analyzing"));' in run + wire = _body(PANEL, "const runner = createDetailRunner({", "});") + assert " apply," in wire and " label: L," in wire assert "Overlay" not in run and "lock" not in run.lower() chrome = _read("B05_Profile", "B05_Profile_UI_Drainage_Chrome.ts") assert "viewport.append(" in chrome and "progress.root," in chrome def test_실패하면_토스트_한_줄(out): - run = _body(PANEL, "async function run(", "/** 지금 관 목록") + run = RUN[RUN.index("async run(") :] assert ( - 'status.textContent = analyzeFailed(error, L("B05_Drainage_Status_AnalyzeFailed"));' in run + 'status.textContent = analyzeFailed(error, label("B05_Drainage_Status_AnalyzeFailed"));' + in run ) failed = out["failed"] assert failed["status"] == "502 Bad Gateway"