Files
Aislo/resources/tester/test_398_1_reveal_user_pick.py
T
eomsangdonandClaude Opus 5.5 0170801088 fix(B05·B06 한 페이지): 교점 옮기면 좌측 패널 열림 — 펴기는 사용자 고름만 (398-1)
- design_user_pick.ts 새 파일 — 사용자 고름 표시 한 칸(진짜 누름 안 · 묶음 차례 없음)
- design_shared onReveal 한 곳이 그 칸만 봄 — 폼(고름 · 우클릭 추가)은 그대로 펴기를 부름
- design_page_data pageBusy — 묶음 차례가 떠 있나
- 배수유역 다시 나눔 응답 · 방향키 · 끌기 · 묶음 다시 돎의 다시 칠하기 = 안 폄
- 시험 test_398_1_reveal_user_pick(헬퍼 helper_398_1_user_pick.cjs)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TteK8mfYZetk5P3bEZkyVZ
2026-10-17 20:47:37 +09:00

74 lines
2.5 KiB
Python

"""PLAN 398-1 sub7 — 교점 옮기면 좌측 패널 열림(요구 248).
못박는 것
- 좌측 패널 저절로 펴기는 사용자 고름만 — 진짜 누름(click · pointerup · contextmenu) 안 = 1.
- 다시 칠하기 · 누가거리 따라가기 · 되돌리기 · 묶음 다시 돎 = 0 — 누름 밖(배수유역 다시 나눔 응답) ·
방향키 · 끌기 도중 · 가짜 누름 · 묶음 차례가 떠 있는 동안(교점 놓음 · 곡선 지우기 · 되돌리기).
- 뿌리 한 곳 — 폼(`selectPipeByChainage` · `selectById` · `addAt`)은 그대로 펴기를 부르고 `design_shared`
onReveal 하나가 `isUserPick` 으로 거름.
짝: `helper_398_1_user_pick.cjs`(진짜 `design_user_pick` · `design_page_data`).
"""
from __future__ import annotations
import json
import subprocess
from pathlib import Path
import pytest
HERE = Path(__file__).resolve().parent
ROOT = HERE.parents[1]
def _read(rel: str) -> str:
return (ROOT / rel).read_text(encoding="utf-8")
@pytest.fixture(scope="module")
def r() -> dict:
proc = subprocess.run( # noqa: S603 — 고정 실행 파일
["node", str(HERE / "helper_398_1_user_pick.cjs")],
capture_output=True,
text=True,
encoding="utf-8",
timeout=60,
)
assert proc.returncode == 0, proc.stderr
return json.loads(proc.stdout)
@pytest.mark.parametrize("way", ["click", "pointerup", "contextmenu", "afterRun"])
def test_사용자_고름은_폄(r, way):
assert r[way] == 1
@pytest.mark.parametrize(
"way", ["outside", "arrow", "drag", "synthetic", "pipelineRepaint", "busyPick"]
)
def test_다시_칠하기는_안_폄(r, way):
assert r[way] == 0
def test_뿌리_한_곳():
shared = _read("A00_Common/design/design_shared.ts")
assert "onReveal: () => isUserPick(shared.projectId) && shared.revealLeft()" in shared
panel = _read("B05_Profile/B05_Profile_UI_Structures_Panel.ts")
assert panel.count("callbacks.onReveal?.()") == 3 # 고름 둘 · 우클릭 추가 — 부르는 쪽은 안 막음
found = subprocess.run( # noqa: S603, S607 — 고정 실행 파일
["git", "grep", "-l", "isUserPick(", "--", "*.ts"],
cwd=ROOT,
capture_output=True,
text=True,
encoding="utf-8",
)
users = set(found.stdout.split()) | {
"A00_Common/design/design_user_pick.ts",
"A00_Common/design/design_shared.ts",
} # 새 파일(추적 전)
assert sorted(users) == [
"A00_Common/design/design_shared.ts",
"A00_Common/design/design_user_pick.ts",
]