Files
Aislo/resources/tester/test_modal_top_and_add_word.py
T
eomsangdonandClaude Opus 5.5 0541830750 fix(공용): 모달 위 고정 · 보이는 글 「더하기」 → 「추가」(30-1)
- 공용 .ui-modal: 세로 가운데 대신 최대 높이 기준 가운데 자리에 윗변 고정 · 아래로만 늘고 줆(찾기 칸이 안 움직임) · 큰 창은 --modal-max(고르기 모달 94vh · 노선 추천 92vh · M01 복사 시트 90vh) · M02 단추 아래 작은 창은 margin-top 0
- 따로 둔 모달도 같게: B01 대시보드 모달 · M01 로직 고르기(m01-logic) · M01 조달 찾기
- 가운데 그대로: 불러오는 중 가림 · 공용 확인 창 · B03 확인 창 · B05 노선 편집(고정 높이) · 스프레드시트 메모 편집
- 「더하기」 → 「추가」 25곳(스프레드시트 · M01 · M02 · 공용 표 · locale) · 안쪽 명령 이름 시트더하기 · 주석은 그대로
- 시험 test_modal_top_and_add_word 새로

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ly2oHAaTDYRjcniAmHR81z
2026-09-30 18:56:43 +09:00

75 lines
3.0 KiB
Python

"""모달 위 고정 · 「더하기」 → 「추가」(PLAN 30-1) — 화면 판정은 ORCA.
· 찾기 있는 모달은 세로 가운데 대신 위에서 고정 거리(목록 길이가 바뀌어도 찾기 칸이 안 움직임)
· 보이는 글에 「더하기」 없음(주석 · 안쪽 명령 이름 `시트더하기` 는 뺌)
"""
from __future__ import annotations
import re
import subprocess
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2]
def _text(rel: str) -> str:
return (ROOT / rel).read_text(encoding="utf-8")
def _block(css: str, selector: str) -> str:
found = re.search(rf"^{re.escape(selector)} \{{([^}}]*)\}}", css, re.M)
assert found, selector
return found.group(1)
def test_공용_모달_위_고정():
css = _text("ui_template/ui_template_modal.css")
assert "align-items: flex-start;" in _block(css, ".ui-modal__backdrop")
modal = _block(css, ".ui-modal")
assert "max-height: var(--modal-max, 80vh);" in modal
assert "margin-top: calc((100vh - var(--modal-max, 80vh)) / 2);" in modal
# 큰 창은 max-height 대신 --modal-max(위 거리가 함께 맞음)
assert "--modal-max: 94vh;" in _block(
_text("ui_template/ui_template_item_picker.css"), ".ui-modal.ui-item-picker"
)
assert "--modal-max: 92vh;" in _block(
_text("B05_Profile/B05_Profile_UI_Style_RouteRecommend.css"), ".ui-modal.b05-routerec"
)
assert "margin-top: 0;" in _block(
_text("M02_MasterTemplete/M02_MasterTemplete_Drawing.css"), ".m02-pop > .ui-modal"
)
def test_따로_둔_모달도_위_고정():
logic = _text("M01_MasterData/M01_MasterData_UI_Logic_Style.css")
assert "align-items: flex-start;" in _block(logic, ".m01-logic__backdrop")
assert "margin-top: calc((100vh - var(--modal-max, 80vh)) / 2);" in _block(
logic, ".m01-logic__pick"
)
assert "--modal-max: 90vh;" in _block(
_text("M01_MasterData/M01_MasterData_UI_LogicLab_Style.css"), ".m01copy__sheet"
)
m01 = _text("M01_MasterData/M01_MasterData_UI_Style.css")
assert "align-items: flex-start;" in _block(m01, ".m01-procure")
assert "margin-top: 10vh;" in _block(m01, ".m01-procure__box")
b01 = _text("B01_Dashboard/B01_Dashboard_UI_Style.css")
assert "align-items: flex-start;" in _block(b01, ".b01-dashboard__modal")
def test_보이는_글에_더하기_없음():
files = subprocess.run(
["git", "ls-files", "*.ts"], cwd=ROOT, capture_output=True, text=True, encoding="utf-8"
).stdout.split()
left = []
for rel in files:
if rel.startswith(("tmp/", "docs/", "resources/")):
continue
for no, line in enumerate(_text(rel).splitlines(), 1):
if line.strip().startswith(("//", "*", "/*")):
continue
for m in re.finditer(r"([\"'`])((?:(?!\1).)*더하기(?:(?!\1).)*)\1", line):
if m.group(2) != "시트더하기": # 안쪽 명령 이름 — 화면에 안 나옴
left.append(f"{rel}:{no}: {m.group(2)}")
assert not left, left