"""PLAN 494-1 — B06 화면 밖 횡단 카드가 쉬는 틈이 안 와도 다시 그려지는가. 구조물을 놓으면 새 측점 카드가 빈 설계로 먼저 서고, 다시 셈 뒤 화면 밖 카드는 쉬는 틈 줄 (`createIdleQueue`)에서 갈아 끼움. 쉬는 틈이 안 오는 창(ORCA 내장 · 가려진 창)에서는 줄이 영영 안 비어 설계선 · 구조물 형상이 없는 카드가 남았음. 짝: `B06_Section/B06_Section_UI_Section_Common.ts`. 실제 TS 를 `helper_494_idle_queue.cjs` 가 Node 로 돌린다. """ from __future__ import annotations import json import os import subprocess HERE = os.path.dirname(__file__) def _run() -> dict: proc = subprocess.run( # noqa: S603 — 고정 실행 파일 ["node", os.path.join(HERE, "helper_494_idle_queue.cjs")], capture_output=True, text=True, encoding="utf-8", timeout=60, ) assert proc.returncode == 0, proc.stderr return json.loads(proc.stdout) def test_쉬는_틈이_없어도_줄의_카드를_모두_그린다() -> None: out = _run() assert out["ran"] == [145, 150, 155, 160, 165] assert out["left"] == [] def test_늦어도_1초_안에_다_그린다() -> None: """카드 다섯 · 두 장씩 = 세 번 — 시간 제한 안에 끝남.""" assert _run()["elapsedMs"] <= 1000 def test_B05_평면_횡단판은_들어올_때_이미_고른_측점을_그린다() -> None: """B05 「횡단」 판 — 고른 구조물을 들고 들어오면 빈 판이었음(다시 누르면 고름이 풀림). `_RouteEdit_Cross` 진짜를 `helper_411_a_cross_structure.cjs` 가 돌림(⑧).""" proc = subprocess.run( # noqa: S603 — 고정 실행 파일 ["node", os.path.join(HERE, "helper_411_a_cross_structure.cjs")], capture_output=True, text=True, encoding="utf-8", timeout=120, ) assert proc.returncode == 0, proc.stderr got = json.loads(proc.stdout)["entryPick"] assert got == {"station": "45", "foot": "횡단 45", "structure": True}