Files
Aislo/resources/tester/test_273_1_profile_reveal.py
T
eomsangdonandClaude Opus 5.5 887c89bbf8 feat(b05,b06): 종단 그래프 — 다른 영역에서 고른 측점이 화면 밖이면 가운데로 이동 (273-1)
- 칠한 결과(고른 측점선 · 없으면 고른 구조물 알약)를 보고 보이는 칸 밖일 때만 가운데로 옮김(createSelectionReveal · design_profile_viewport)
- 같은 고름을 다시 칠하면 안 밂(사용자가 옮겨 본 자리 지킴) · 그래프 안 누름은 보이는 자리라 안 움직임 · 고른 뒤 다시 그리기가 끊지 않게 바로 옮김
- 요구 168 원문 기록 · 시험 test_273_1 새로

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LLCk2y5xE8YGVgjbTntWsY
2026-10-11 20:20:24 +09:00

57 lines
1.7 KiB
Python

"""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