diff --git a/resources/tester/helper_b05_save_payload.mjs b/resources/tester/helper_b05_save_payload.mjs index 363a51f3..08d24b21 100644 --- a/resources/tester/helper_b05_save_payload.mjs +++ b/resources/tester/helper_b05_save_payload.mjs @@ -1,6 +1,6 @@ // 저장 왕복 시험용 — 화면 TS 를 node 로 묶어 저장 본문을 만든다. // node helper_b05_save_payload.mjs <저장소 뿌리> · 표준입력 = 작업 목록(JSON) · 표준출력 끝 줄 = 결과 목록 -// {op:"attach", entries:[관 응답], points:[{chainage_m, source}]} → attach 결과(DetailPipeInput[]) +// {op:"attach", entries:[관 응답], moves:[[옛, 새]], points:[{chainage_m, source}]} → attach 결과 // {op:"station", chainage, interval} → 구조물 측점 칸에 쓰고 다시 읽은 값 // {op:"culvert", server:[관 응답], pending:{측점:조각}, moves:{측점:새 측점}} → PUT 본문 points 또는 null import fs from "node:fs"; @@ -78,6 +78,8 @@ try { if (job.op === "attach") { const store = mod.createFacilityStore(); store.replaceFromResponse(job.entries); + // 지도에서 끈 관 — 화면이 끌기를 마치면 속성을 새 측점으로 옮김(onMove) + for (const [from, to] of job.moves ?? []) store.move(from, to); results.push(store.attach(job.points)); } else if (job.op === "station") { const fields = mod.stationFields("측점", () => job.interval); diff --git a/resources/tester/test_b05_b06_save_roundtrip.py b/resources/tester/test_b05_b06_save_roundtrip.py index 4132a008..a3b25de8 100644 --- a/resources/tester/test_b05_b06_save_roundtrip.py +++ b/resources/tester/test_b05_b06_save_roundtrip.py @@ -301,7 +301,8 @@ class Flow: } for p in self.want_pipes ] - (attached,) = _screen([{"op": "attach", "entries": entries, "points": points}]) + job = {"op": "attach", "entries": entries, "moves": [self.pipe_move], "points": points} + (attached,) = _screen([job]) return attached def b06_pipe_payload(self) -> list[dict[str, Any]]: