Files
Aislo/resources/tester/test_737_option_grid_foot.py
T
eomsangdonandClaude Sonnet 5.5 10984109b4 feat(737): 단가산출 상세 옵션 6 열 격자 · 합계 한 줄 바닥 고정 · 텍스트 수식 비목 상자 · 두 보기 같은 제목
- 옵션 칸 = 상자 폭 기준 1 → 2 → 3 → 4 → 6 열(calc_sheet optionGrid · container query) · 공통 옵션 따로 상자 걷고 모든 상자 맨 위 옵션 칸에 같이
- 맨 아래 노무비 · 재료비 · 경비 · 계 = 한 줄 4 칸 · 화면(모달) 바닥 sticky · 메인 칸 overflow clip(굴림 칸이면 안 붙음)
- 텍스트 수식 = 비목 구분 상자 · 상자 위 옵션 칸 · 줄마다 붙던 옵션 꼬리표 걷음
- 두 보기 상자 제목 「단가산출 상세」 · 「지금 입력」 꼬리표 걷음
- 신규 지킴 시험 test_737_option_grid_foot

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-02 18:25:09 +09:00

47 lines
2.1 KiB
Python

"""737 단가산출 상세 — 옵션 칸 격자 · 합계 한 줄 바닥 · 두 보기 같은 제목 · 비목 상자 지킴 시험(글 대조 · 서버 · 화면 없음)."""
import re
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
M01 = ROOT / "M01_MasterData"
SHEET_CSS = (ROOT / "A00_Common" / "calc_sheet.css").read_text(encoding="utf-8")
STYLE = (M01 / "M01_MasterData_UI_LogicLab_Style.css").read_text(encoding="utf-8")
HO = (M01 / "M01_MasterData_UI_LogicLab_Ho.ts").read_text(encoding="utf-8")
DETAIL = (M01 / "M01_MasterData_UI_LogicLab_Detail.ts").read_text(encoding="utf-8")
FX = (M01 / "M01_MasterData_UI_LogicLab_Formula.ts").read_text(encoding="utf-8")
def test_옵션_격자_폭_따라_6_4_3_2_1():
cols = re.findall(
r"@container \(min-width: (\d+)px\) \{\s*\.calc-sheet__opts-grid \{\s*grid-template-columns: repeat\((\d), ",
SHEET_CSS,
)
assert cols == [("300", "2"), ("450", "3"), ("600", "4"), ("900", "6")]
assert "container-type: inline-size" in SHEET_CSS # 창 폭이 아니라 상자 폭 기준
def test_합계_한_줄_바닥_고정():
foot = STYLE[STYLE.index(".m01lab__foot {") :]
foot = foot[: foot.index("}")]
assert "position: sticky" in foot and "bottom: 0" in foot
assert "repeat(4, minmax(0, 1fr))" in foot
assert "overflow: clip" in STYLE # 메인 칸이 굴림 칸이면 바닥에 안 붙음
assert 'className: "m01lab__foot"' in HO
def test_공통_옵션은_모든_박스에_같이():
assert "optionRows([...usesOf(b), ...common], ctx)" in HO
assert "commonCard(" in HO and "boxes.length ||" in HO # 박스 없을 때만 따로 카드
def test_두_보기_같은_제목_지금_입력_꼬리표_없음():
assert 'section(tl("Formula_Title")' not in DETAIL
assert 'section(tl("Ho_Title"), [formula])' in DETAIL
assert "nowInputs(ctx.values), ...blocks" not in DETAIL
def test_텍스트_수식은_비목_상자_옵션은_상자_위():
assert "createCard({" in FX and "fxBox" in FX and "optionGrid(" in FX
assert "...vars(line)" not in FX # 줄마다 붙던 옵션 꼬리표 걷음