- B08 거리이정표 우클릭 [단가연결] · B09 운반공 줄 — 연결 없으면 단가연결 목록 → 옵션 값 창(askInputs) - 연결 있으면 「운반 단가」 모달 · 그 밖 B09 줄 그대로 - 운반 단가 모달 크기 96vw × 94vh → min(1100px, 94vw) × min(680px, 86vh) · 가운데 · 두 칸 따로 스크롤 - 옛 결정(연결 · 미연결 같은 모달)을 고정한 시험 두 줄 고침 · test_276_1 추가 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KjUPRxjDxULvh5VA7kX5py
39 lines
1.7 KiB
Python
39 lines
1.7 KiB
Python
"""276 단가연결 — 연결 없음 = 옛 길(단가연결 목록 → 옵션 값 창) · 연결 있음 = 「운반 단가」 모달(작게) ·
|
|
B08 거리이정표 · B09 운반공 줄 같음 · 옛 길 연결(own 없음 · 빈칸)도 서버가 그 행 거리로 채움."""
|
|
|
|
import re
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
sys.path.insert(0, str(ROOT))
|
|
|
|
from B08_Quantity.B08_Quantity_Haul_Cycle import fill_given # noqa: E402
|
|
from B09_Estimation.B09_Estimation_Sangeun import _input_names # noqa: E402
|
|
|
|
|
|
def _src(name: str) -> str:
|
|
return re.sub(r"\s+", " ", (ROOT / name).read_text(encoding="utf-8"))
|
|
|
|
|
|
def test_연결_있으면_운반_모달_없으면_옛_길():
|
|
milestone = _src("B08_Quantity/B08_Quantity_UI_Milestone.ts")
|
|
assert "() => route.ref ? openHaulModal({ ref: route.ref as Row," in milestone
|
|
assert ": void openPriceLink({ apply: link })," in milestone
|
|
link = _src("B09_Estimation/B09_Estimation_UI_Tabs_Bill_Link.ts")
|
|
assert '[["단가연결", haul && ref ? haulModal : priceLink]]' in link
|
|
# 옛 길 = 목록에서 로직 고르면 옵션 값 창(askInputs)
|
|
assert 'if (p.kind === "logic") askInputs(o.apply, p.code, p.name);' in link
|
|
|
|
|
|
def test_운반_모달_작게():
|
|
modal = _src("B09_Estimation/B09_Estimation_UI_Haul_Modal.ts")
|
|
assert '"--modal-max:min(680px,86vh);width:min(1100px,94vw);height:var(--modal-max)"' in modal
|
|
assert "min-height:60vh" not in modal and "flex:1;min-height:0" in modal
|
|
|
|
|
|
def test_옛_길_연결도_거리로_채움():
|
|
ref = {"tab": "logic", "code": "GF000284", "given": {}} # askInputs 꼴 — own 없음 · 빈칸
|
|
got = fill_given(ref, _input_names("GF000284"), {"L1": 23.8, "L2": 10.5})
|
|
assert got["운반거리"] == 34.3
|