- [로직 복사/생성] 누름 = 기본정보 창(있는 askBasicInfo · 원본 값 채움) → /logic/copy 로 원본 문서를 새 자체 GX 문서로 복제 → 그 기초를 줄 쌓기로 엶
- 걷음: 화면 LogicLab_Copy.ts · Logic_Calc.ts(부르는 곳 = 서로뿐) · API fetchLogicFormula · saveLogicFormula · previewLogicFormula · 꼴 셋 · 글 키 · CSS m01copy (서버 길 /logic/formula · save · preview 는 앞 auto 커밋 cce57c298 에서 걷음 · openapi 뜻한 셋만 빠짐)
- 시험: test_modal_top_and_add_word 복사 시트 창 줄 뺌(걷은 파일 · CSS 의 글자 대조 줄)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
70 lines
2.8 KiB
Python
70 lines
2.8 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((100dvh - var(--modal-max, 80vh)) / 2);" in modal
|
|
# 큰 창은 max-height 대신 --modal-max(위 거리가 함께 맞음)
|
|
# 고르기 창 = 공용 큰 창 곁값(147-2)
|
|
assert "--modal-max: 94vh;" in _block(css, ".ui-modal.ui-modal--wide")
|
|
assert "wide: true," in _text("ui_template/ui_template_item_picker.ts")
|
|
assert "margin-top: 0;" in _block(
|
|
_text("M02_MasterTemplete/M02_MasterTemplete_Drawing.css"), ".m02-pop > .ui-modal"
|
|
)
|
|
|
|
|
|
def test_따로_둔_모달도_위_고정():
|
|
# M01 고르기 · 조달 창 = 모달 부품(553-5) — 위 고정은 공용 .ui-modal 이 냄(복사 시트 창은 855 L3 ⓐ 에서 걷음)
|
|
for rel in (
|
|
"M01_MasterData/M01_MasterData_UI_Pick.ts",
|
|
"M01_MasterData/M01_MasterData_UI_Logic_PickTable.ts",
|
|
):
|
|
src = _text(rel)
|
|
assert "openModal(" in src and "document.body.append(" not in src, rel
|
|
b01 = _text("B01_Dashboard/B01_Dashboard_UI_Style.css") + _text(
|
|
"B01_Dashboard/B01_Dashboard_UI_Style_Company.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
|