Files
Aislo/resources/tester/test_233_4_empty_click.py
T
eomsangdonandClaude Opus 5.5 78bab9eeda fix(design): 종단 · 유토곡선 · 횡단 그리드 빈 곳 누름도 고름 안 풂 (233-4)
- 빈 곳 누름 해제 듣개 뗌 — 3D 와 같은 한 규칙
- 풀기는 Esc · 같은 것 다시 누름 한 길 · 도구 중 빈 곳 누름은 그대로

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01STqEqztUthVFBmEP18wBSz
2026-10-10 19:18:19 +09:00

73 lines
2.6 KiB
Python

# -*- coding: utf-8 -*-
"""233-4 빈 곳 누름 = 어디서도 안 풂 — 3D(232-1)와 같은 한 규칙.
까닭: 종단 그래프 · 유토곡선 빈 곳 누름(08-04)과 횡단 그리드(카드 사이 · 밖) 빈 곳 누름(08-02)은 고름을 풀었고
3D 빈 곳 누름(232-1)만 안 풀어 화면마다 「해제」 뜻이 달랐음(조사 AF 5절 5).
고침: 빈 곳 누름 듣개를 뗌 · 풀기는 Esc(`design_pick_escape`) 또는 같은 것 다시 누름 한 길 ·
도구([직선화] · [쉬프트] · [자유지정]) 중 빈 곳 누름은 도구 몫 그대로.
진짜 소스의 누름 처리 본문을 `helper_233_4_empty_click.cjs` 가 떼어 Node 로 돌린다.
"""
from __future__ import annotations
import json
import os
import subprocess
import pytest
HERE = os.path.dirname(os.path.abspath(__file__))
ROOT = os.path.abspath(os.path.join(HERE, "..", ".."))
pytestmark = pytest.mark.skipif(
not os.path.isdir(os.path.join(ROOT, "config", "node_modules")),
reason="프론트엔드 의존성 미설치",
)
def _read(*parts: str) -> str:
with open(os.path.join(ROOT, *parts), encoding="utf-8") as handle:
return handle.read()
@pytest.fixture(scope="module")
def out() -> dict:
proc = subprocess.run( # noqa: S603 — 고정 실행 파일
["node", os.path.join(HERE, "helper_233_4_empty_click.cjs")],
capture_output=True,
text=True,
encoding="utf-8",
timeout=60,
)
assert proc.returncode == 0, proc.stderr
return json.loads(proc.stdout)
def test_종단_빈_곳_누름은_고름_유지(out) -> None:
assert out["profileEmpty"] == [] # 옛 코드 = 측점 · 알약 · 폼 풂
def test_종단_도구_중_빈_곳_누름은_도구_몫_그대로(out) -> None:
assert out["profileEmptyTool"] == ["tool:42"]
def test_횡단_그리드_빈_곳_누름은_고름_유지(out) -> None:
assert out["gridEmpty"] == [] # 옛 코드 = clearSelection
assert out["gridListeners"] == 1 # 노면공 형상 누름만 남음(189-1)
def test_같은_것_다시_누름은_풂(out) -> None:
assert (out["profileFirst"], out["profileAgain"]) == ("s120", None)
assert (out["cardFirst"], out["cardAgain"]) == ("s120", None)
def test_Esc는_풂(out) -> None:
assert out["beforeEsc"] == {"chainageM": 120, "structureId": None}
assert out["afterEsc"] is None
def test_유토곡선_빈_곳_누름도_안_풂() -> None:
mass = _read("B05_Profile", "B05_Profile_UI_Profile_MassHaul.ts")
render = _read("B05_Profile", "B05_Profile_UI_Profile_Render.ts")
assert "onClearSelection" not in mass and "onClearSelection" not in render