"""PLAN 241-1 · 123 → 246-1 · 128 — B08 · B09 표 입력 칸 = 테두리 되돌림(241 앞 채움 색).""" import re from pathlib import Path ROOT = Path(__file__).resolve().parents[2] CSS = ROOT / "ui_template" / "ui_template_data_table.css" def _rule(css: str, selector: str) -> str: m = re.search(re.escape(selector) + r" \{([^}]*)\}", css) assert m, selector return m.group(1) def test_입력_칸_채움_색_테두리_없음(): body = _rule(CSS.read_text(encoding="utf-8"), ".ui-data-table__input") # 246-1 — 241 앞 모양(accent 5% 채움) · 안쪽 테두리 없음 assert "background: color-mix(in srgb, var(--color-accent) 5%, var(--color-canvas));" in body assert "box-shadow" not in body assert "#" not in body # 하드코딩 색 없음 — 테마 변수만 assert "border: 0;" in body assert "height: var(--dt-row-h);" in body def test_초점_테두리_그대로(): body = _rule(CSS.read_text(encoding="utf-8"), ".ui-data-table__input:focus") assert "outline: 2px solid var(--color-focus-ring);" in body assert "outline-offset: -2px;" in body def test_고친_값_색_칸_그대로(): css = (ROOT / "B09_Estimation" / "B09_Estimation_UI_Page.css").read_text(encoding="utf-8") body = _rule(css, ".b09-estimation .ui-data-table__table tbody td.is-edited") assert "color-mix(in srgb, var(--color-warning) 22%, var(--color-canvas))" in body ts = (ROOT / "B09_Estimation" / "B09_Estimation_UI_Tabs_Bill.ts").read_text(encoding="utf-8") assert '"is-edited"' in ts