Files
Aislo/resources/tester/test_est_action_bindings.py
T
eomsangdonandClaude Opus 5.5 e7e59fc513 feat(est-test): 수량산출서 복사와 순서 이동
- 현재 산출서 아래에 복사본 추가, 내역 연결은 비워 이중 반영 방지
- 산출서 위로·아래로, 순서 변경 ESTX 저장은 명확한 문구로 거부
- 단추 지킴 시험이 cjs 화면 파일도 검사

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 15:04:11 +09:00

29 lines
956 B
Python

"""EST 테스트 앱: 처리기가 있는 화면 동작은 모두 단추·메뉴로 부를 수 있어야 함."""
import re
from pathlib import Path
ROOT = Path(__file__).resolve().parents[2] / "tools" / "est-test"
def test_every_handled_action_has_a_trigger():
sources = {
p.name: p.read_text(encoding="utf-8")
for p in [*ROOT.glob("native-*.js"), *ROOT.glob("native-*.cjs")]
}
sources["index.html"] = (ROOT / "index.html").read_text(encoding="utf-8")
handled = set()
for text in sources.values():
handled.update(re.findall(r'name === "([a-z0-9-]+)"', text))
assert handled
unbound = []
for name in sorted(handled):
uses = sum(
len(re.findall(rf'"{re.escape(name)}"', text))
- len(re.findall(rf'name === "{re.escape(name)}"', text))
for text in sources.values()
)
if uses <= 0:
unbound.append(name)
assert unbound == []