- 배수유역 판 켬끔(setVisible · drainage-visible 값) 지움 — 판은 늘 보임 · 접기 · 펼치기는 판 손잡이 하나로 · 옛 값 false 무시 - [새 창] 단추 = 도구 묶음 맨 앞(toolLead) — 다시 그릴 때마다 [초기화] 바로 왼쪽에 옮겨 붙임 · 열림 · 닫힘 동작 그대로 - 시험 test_282_1 추가 · 옛 단추를 찾던 시험(187-1 · drainage_side · profile_single) 새 꼴로 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QfHKQs7J3hQELKMWQMUJEy
68 lines
2.4 KiB
Python
68 lines
2.4 KiB
Python
"""282 B05 · B06 아래 종단 패널 도구줄 — [배수유역도] 단추 지움 · [새 창] = [초기화] 왼쪽(요구 177).
|
|
|
|
- 282-1 [배수유역도] 켬끔 단추 · 켬끔 값(`drainage-visible`) 없음 · 옛 값 false 여도 판 · 손잡이 보임
|
|
- 282-2 [새 창] = 도구 묶음 맨 앞([초기화] 바로 왼쪽) · 다시 그려도 그 자리 · 열림 · 닫힘 동작 그대로
|
|
`helper_282_1_profile_toolbar.cjs` 가 진짜 TS 를 가짜 DOM 위에서 돌림.
|
|
"""
|
|
|
|
import json
|
|
import os
|
|
import subprocess
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
HERE = os.path.dirname(os.path.abspath(__file__))
|
|
TOOLS = ["초기화", "↶", "↷", "직선화", "자유지정", "쉬프트", "▲", "▼"]
|
|
|
|
|
|
@pytest.fixture(scope="module")
|
|
def out():
|
|
proc = subprocess.run(
|
|
["node", os.path.join(HERE, "helper_282_1_profile_toolbar.cjs")],
|
|
capture_output=True,
|
|
text=True,
|
|
encoding="utf-8",
|
|
timeout=60,
|
|
)
|
|
assert proc.returncode == 0, proc.stderr
|
|
return json.loads(proc.stdout)
|
|
|
|
|
|
def test_배수유역도_단추_코드_없음():
|
|
for rel in (
|
|
"B05_Profile/B05_Profile_UI_Drainage_Side.ts",
|
|
"B05_Profile/B05_Profile_UI_Profile_SideTool.ts",
|
|
"A00_Common/design/design_profile.ts",
|
|
"A00_Common/design/design_shared.ts",
|
|
"A00_Common/design/design_profile_popout.ts",
|
|
"A00_Common/b_page_state.ts",
|
|
"B05_Profile/B05_Profile_UI_Style_Table.css",
|
|
):
|
|
src = (ROOT / rel).read_text(encoding="utf-8")
|
|
for gone in (
|
|
"createDrainageToggleButton",
|
|
"b05-drainage__toggle",
|
|
"drainage-visible",
|
|
"sideTool",
|
|
):
|
|
assert gone not in src, (rel, gone)
|
|
|
|
|
|
def test_새_창_초기화_바로_앞_다시_그려도(out):
|
|
assert out["first"] == ["새 창", *TOOLS]
|
|
assert out["again"] == ["새 창", *TOOLS]
|
|
assert "b05-route-profile__popout" in out["buttonClass"]
|
|
|
|
|
|
def test_새_창_열림_닫힘(out):
|
|
assert out["opened"] == {"text": "제자리로", "inPopup": True}
|
|
assert out["openedRender"] == ["제자리로", *TOOLS]
|
|
assert out["closed"] == {"text": "새 창", "inSlot": True, "popupClosed": True}
|
|
assert out["closedRender"] == ["새 창", *TOOLS]
|
|
|
|
|
|
def test_옛_값_false_여도_판_손잡이_보임(out):
|
|
assert out["side"] == {"rootHidden": False, "handleHidden": False, "hasSetVisible": False}
|