- 공용 createPanelCard 곁값 onSettings — 캐럿 왼쪽 ⚙ · 누름이 접힘 안 일으킴(B08 · B09 그대로) - 평면도 ⚙ = 평면도 관리 모달([평면도 관리] 단추 지움) · 횡단도 ⚙ = 배치 칸 · 표 배율 · 안내선(카드 밑 칸 지움) · 구조물 ⚙ = 「M02 그림 — 축척 없음」 · 종단 1장 · 토적 = 단추 안 ⚙ · 표지 없음 - ⚙ 머리 [원본에서 다시 그리기] — 그 묶음 도면을 연 때만 · 저장본이면 invalidate - 잠금 없음(요구 281) — 읽기 전용 안 묶음 · 자동 B08 이동 · 「모든 횡단 확정」 잠금 지움 - onStepClick 한 길 = 고친 탭(●) + 지금 탭 저장 → B08 · B09 면 단계 4 완료(새 POST design-drawings-complete) → 이동 · 실패 = 머묾 - 저장 · 원본 묶음 = 새 B07_DesignDetail_UI_Save.ts · 모달 = 새 B07_DesignDetail_UI_Settings.ts(UI_Page 633 → 543줄) - 탭 줄 = .cad-host 의 --cad-tab-slot-left/right(px · CSS left · right 꼴) 있으면 리본 빈 자리에 겹침 · 없으면 지금 자리 - 시험: 새 test_280_5_b07_settings · 130 · 153-1 · 180-3 · 212-3 · 269 · 311 고쳐 씀 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
75 lines
2.5 KiB
Python
75 lines
2.5 KiB
Python
# -*- coding: utf-8 -*-
|
|
"""153-1 B07 횡단 장 배치 칸.
|
|
|
|
못박는 것
|
|
- 배치 칸 자리 = 「횡단도」 카드 ⚙ 모달(280-5) — 카드엔 ⚙ 하나 · 배치 칸 없음.
|
|
- 공용 입력칸(ui-field__label · ui-input--sm · 1~10) 둘 + 작은 ghost 단추 [이 장] [모든 장].
|
|
- 장이 아니면 [이 장] 꺼짐 · [모든 장]은 됨 · 범위 밖 값 = 알림만.
|
|
|
|
Node 헬퍼 `helper_153_b07_cross_layout.cjs` 가 화면 그릇 흉내로 돌림. 화면은 사용자 확인.
|
|
"""
|
|
|
|
import json
|
|
import os
|
|
import subprocess
|
|
|
|
import pytest
|
|
|
|
HERE = os.path.dirname(os.path.abspath(__file__))
|
|
|
|
|
|
@pytest.fixture(scope="module")
|
|
def out():
|
|
proc = subprocess.run(
|
|
["node", os.path.join(HERE, "helper_153_b07_cross_layout.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):
|
|
card = out["card"]
|
|
assert card["gears"] == 1
|
|
assert card["layoutInCard"] == 0
|
|
assert card["settings"] == ["cross"]
|
|
|
|
|
|
def test_공용_입력칸과_작은_단추(out):
|
|
sheet = out["sheet"]
|
|
assert sheet["boxClass"] == "b07-cross-layout"
|
|
assert sheet["labels"] == ["배치 열", "행"]
|
|
assert [i["value"] for i in sheet["inputs"]] == ["3", "4"]
|
|
for field in sheet["inputs"]:
|
|
assert field["type"] == "number" and field["min"] == "1" and field["max"] == "10"
|
|
assert "ui-input--sm" in field["cls"]
|
|
assert [b["text"] for b in sheet["buttons"]] == ["이 장", "모든 장"]
|
|
for button in sheet["buttons"]:
|
|
assert button["cls"] == "ui-btn ui-btn--ghost ui-btn--sm" and not button["disabled"]
|
|
|
|
|
|
def test_이_장_모든_장_누름(out):
|
|
clicks = out["sheetClicks"]
|
|
assert clicks["applied"] == [[2, 5]]
|
|
assert clicks["defaults"] == [[2, 5]]
|
|
assert [t[0] for t in clicks["toasts"]] == ["error"] # 11 = 범위 밖
|
|
|
|
|
|
def test_장_아니면_이_장_꺼짐(out):
|
|
not_sheet = out["notSheet"]
|
|
assert not_sheet["disabled"] == [True, False]
|
|
assert not_sheet["defaults"] == [[4, 4]]
|
|
assert not_sheet["values"] == ["4", "4"]
|
|
|
|
|
|
def test_표_배율_칸(out):
|
|
scale = out["scale"]
|
|
assert scale["labels"] == ["배치 열", "행", "표 배율"]
|
|
assert scale["input"] == {"value": "1", "min": "0.5", "max": "2", "step": "0.1"}
|
|
assert scale["buttons"] == ["이 장", "모든 장", "배율 적용"]
|
|
assert scale["applied"] == [1.5]
|
|
assert scale["toasts"] == ["error"] # 2.5 = 범위 밖
|