Files
Aislo/resources/tester/test_364_6b_std_note_same_line.py
T

24 lines
856 B
Python

"""364-6 덧 2 — 암 글이 라벨과 같은 줄 끝(줄 수 안 늘림). 화면 실측은 브레인."""
import re
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
TS = (ROOT / "B06_Section/B06_Section_UI_Standard_Panel.ts").read_text(encoding="utf-8")
CSS = (ROOT / "B06_Section/B06_Section_UI_Style.css").read_text(encoding="utf-8")
def rule(sel: str) -> str:
m = re.search(re.escape(sel) + r"\s*\{([^}]*)\}", CSS)
assert m, sel
return m.group(1)
def test_label_row_one_line():
assert "replaceChildren(text, note)" in TS
assert "display: flex" in rule(".b06-std__label-row")
text = rule(".b06-std__label-text")
assert "text-overflow: ellipsis" in text and "white-space: nowrap" in text
note = rule(".b06-std__group-note")
assert "margin-left: auto" in note and "white-space: nowrap" in note