Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01W4uKaV4ZBhsJN4GHG7yRj4
36 lines
1.5 KiB
Python
36 lines
1.5 KiB
Python
# -*- coding: utf-8 -*-
|
|
"""50-1 면적산출 알약 · 보낸 범위 표시 — 원문 규칙 점검(화면 수치는 ui_checks/50-1_*.js 를 ORCA 로)."""
|
|
|
|
import os
|
|
|
|
HERE = os.path.dirname(os.path.abspath(__file__))
|
|
ROOT = os.path.join(HERE, "..", "..")
|
|
|
|
|
|
def _read(*parts: str) -> str:
|
|
with open(os.path.join(ROOT, *parts), encoding="utf-8") as f:
|
|
return f.read()
|
|
|
|
|
|
def test_orphan_mark_only_when_list_confirmed():
|
|
# ⚠ 는 호스트가 목록을 확정했을 때만 — 알약 받기 실패(확정 없음)는 표시 안 함
|
|
links = _read("A00_Common", "spreadsheet", "spreadsheet_links.ts")
|
|
assert 'opts.모드 === "입력" && opts.확정 === true' in links
|
|
structure = _read("M02_MasterTemplete", "M02_MasterTemplete_Structure.ts")
|
|
assert "확정: true" in structure
|
|
assert structure.count("확정: true") == 1 # 실패 길(none)은 확정 없음
|
|
|
|
|
|
def test_cell_pick_highlights_pill_and_range_is_unfilled():
|
|
links = _read("A00_Common", "spreadsheet", "spreadsheet_links.ts")
|
|
assert "is-here" in links and "scrollIntoView" in links
|
|
css = _read("A00_Common", "spreadsheet", "spreadsheet_links.css")
|
|
block = css.split(".ss-link-range {", 1)[1].split("}", 1)[0]
|
|
assert "dashed" in block and "background" not in block # 채움 없음 = 알약 색과 안 겹침
|
|
|
|
|
|
def test_sent_ranges_from_same_column_drawing():
|
|
src = _read("M02_MasterTemplete", "M02_MasterTemplete_AreaToDrawing.ts")
|
|
assert 'readTemplate(at.layer, "structure", at.name, at.projectId)' in src
|
|
assert '"{id} 도면"' in src
|