- 파일 23 개 git mv · 이름 M02_SO_* → M01_SO_* · 내용 · 동작 · 화면 글 그대로 - 서버 주소 /api/m02 → /api/m01(이름만 · 10 길 · 수 469 그대로) · main.py 등록 이름 m01_so_* - 화면 부름 = common_util_m02_call 의 call 에 base 인자(기본 /m02 · 구조물 정의만 /m01) - import 고침 = B05 · B07 · B08 · M01 · M02 · main · 시험 · 도우미 - 소스 글자만 보던 시험 셋 지움(구조물 정의 옮김에 걸림 · 결과를 안 봄): test_m02_structure_options 좌측 줄 · test_m02_structure_option_groups 좌측 정의 줄 · test_136_3 M02 미리보기 단추 CSS - test_553_5 부품 훑기 폴더 = 옮긴 자리 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
45 lines
1.7 KiB
Python
45 lines
1.7 KiB
Python
"""136-3 상자 이름표 [빼기] → [삭제] · 「구조물 조합」 [선택]과 같은 작은 단추 틀 ·
|
|
흐림은 이름표 글에만.
|
|
|
|
공용 명세 폼(`design_structure_form.ts`)을 그 자리에서 돌린 값
|
|
(`helper_54_10_soil_tiers.cjs` 의 `remove`) + CSS 규칙(`B05_Profile_UI_Style_Structures.css`).
|
|
"""
|
|
|
|
import json
|
|
import subprocess
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
HERE = Path(__file__).parent
|
|
ROOT = HERE.parents[1]
|
|
CSS = (ROOT / "B05_Profile" / "B05_Profile_UI_Style_Structures.css").read_text(encoding="utf-8")
|
|
|
|
|
|
def _rule(selector: str) -> str:
|
|
"""선택자부터 그 규칙 끝(`}`)까지."""
|
|
at = CSS.index(selector)
|
|
return CSS[at : CSS.index("}", at)]
|
|
|
|
|
|
@pytest.mark.skipif(not (ROOT / "config" / "node_modules").is_dir(), reason="의존성 미설치")
|
|
def test_이름표_단추_글은_삭제():
|
|
done = subprocess.run( # noqa: S603 — 고정 실행 파일
|
|
["node", str(HERE / "helper_54_10_soil_tiers.cjs")],
|
|
capture_output=True,
|
|
text=True,
|
|
encoding="utf-8",
|
|
)
|
|
assert done.returncode == 0, done.stderr
|
|
remove = json.loads(done.stdout)["remove"]
|
|
assert {"id": "chute_add", "text": "삭제", "title": "도수로/돌붙임 상자 삭제"} in remove
|
|
assert all(b["text"] == "삭제" for b in remove)
|
|
|
|
|
|
def test_이름표_단추는_작은_단추_틀_흐림은_글에만():
|
|
small = _rule(".b05-structure__group > legend > button")
|
|
assert ".b05-structure__group-body button:not(.b05-structure__step)" in CSS
|
|
assert "height: var(--b05-control-h)" in small and "padding-block: 0" in small
|
|
legend = _rule(".b05-structure__group > legend {")
|
|
assert "opacity" not in legend and "currentColor 80%" in legend
|