45 lines
1.6 KiB
Python
45 lines
1.6 KiB
Python
"""513-3 종단 · 평면 우클릭 「구조물 삭제」 관 아닌 구조물도(요구 327-1) — 측점 주인을 갈라 관 = 관 지점 정본 ·
|
|
그 밖 = 좌측 칸 [삭제]와 같은 `removeById`(공용 `removeStationOwner`).
|
|
|
|
TS 셈은 `helper_513_3_remove_station_owner.cjs`(Node · 주인 가르기는 진짜).
|
|
|
|
./venv/Scripts/python.exe -m pytest resources/tester/test_513_3_remove_station_owner.py -q
|
|
"""
|
|
|
|
import json
|
|
import subprocess
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
HELPER = Path(__file__).with_name("helper_513_3_remove_station_owner.cjs")
|
|
|
|
|
|
def test_주인대로_지움() -> None:
|
|
run = subprocess.run( # noqa: S603 — 고정 실행 파일
|
|
["node", str(HELPER)],
|
|
capture_output=True,
|
|
text=True,
|
|
encoding="utf-8",
|
|
timeout=120,
|
|
)
|
|
assert run.returncode == 0, run.stderr
|
|
assert json.loads(run.stdout)["calls"] == [
|
|
["pipe", 40],
|
|
["structure", "wall-7"],
|
|
["structure", "wall-8"],
|
|
["structure", "wall-8"],
|
|
["pipe", 55],
|
|
["pipe", 12.5],
|
|
]
|
|
|
|
|
|
def test_두_보기_배선() -> None:
|
|
view = (ROOT / "A00_Common" / "design" / "design_view_profile.ts").read_text(encoding="utf-8")
|
|
assert "removeStationOwner(station, isPipeStation(station)" in view
|
|
assert "panel.structures.removeById(structureId)" in view
|
|
cross = (ROOT / "B06_Section" / "B06_Section_UI_Section_View_Profile.ts").read_text(
|
|
encoding="utf-8"
|
|
)
|
|
assert "removeStationOwner(station, isPipeStation(station)" in cross
|
|
assert "structure: edit.removeStructure" in cross
|