"""273-1 — 다른 영역(횡단 카드 · 3D · 배수유역도 · 좌측 목록)에서 고르면 종단 그래프가 그 측점을 가운데로 옮김(요구 168). 칠한 결과(강조된 측점선 · 알약)를 보고 화면 밖일 때만 · 같은 고름을 다시 칠하면 안 밂 · 그래프 안에서 누른 것(보이는 자리)은 안 움직임. 진짜 TS 는 `helper_273_1_profile_reveal.cjs` 가 Node 로 돌림. """ from __future__ import annotations import json import subprocess from pathlib import Path import pytest HERE = Path(__file__).resolve().parent ROOT = HERE.parents[1] pytestmark = pytest.mark.skipif( not (ROOT / "config" / "node_modules" / "typescript").is_dir(), reason="프론트엔드 의존성 미설치", ) @pytest.fixture(scope="module") def ts() -> dict: proc = subprocess.run( # noqa: S603 — 고정 실행 파일 ["node", str(HERE / "helper_273_1_profile_reveal.cjs")], capture_output=True, text=True, encoding="utf-8", cwd=str(ROOT), check=False, ) assert proc.returncode == 0, proc.stderr return json.loads(proc.stdout) def test_화면_밖이면_가운데로(ts) -> None: assert ts["far"] == 3000 - 350 def test_같은_고름을_다시_칠하면_안_밂(ts) -> None: assert ts["same"] == 100 def test_보이는_자리면_안_움직임(ts) -> None: assert ts["near"] == 0 def test_그리기_전이면_다음_칠하기에서_옮김(ts) -> None: assert ts["late"] == 2000 - 350 def test_종단도가_고름마다_부름() -> None: src = (ROOT / "A00_Common/design/design_profile.ts").read_text(encoding="utf-8") assert src.count("revealPick();") == 2