"""782-1 작은 흠 둘 — 소스 지킴: 끝내기 확인창 인자 자리 · 로직 편집 소유 선택지.""" from pathlib import Path ROOT = Path(__file__).resolve().parents[2] def test_finish_confirm_args_in_order(): src = (ROOT / "M02_MasterTemplete/M02_MasterTemplete_Hopyo_Import.ts").read_text("utf-8") at = src.index("showConfirmDialog(") block = src[at : src.index(");", at)] assert block.rstrip().endswith('"끝내기",') or '"끝내기"' in block.splitlines()[-1] assert "M02_SkUnmoved" in block.split('"끝내기"')[0] assert block.count('"끝내기"') == 1 and '""' not in block.split("// 780-2")[-1] def test_owner_choices_match_server(): ui = (ROOT / "M01_MasterData/M01_MasterData_UI_Logic_Edit.ts").read_text("utf-8") py = (ROOT / "M01_MasterData/M01_MasterData_Store_Make.py").read_text("utf-8") assert 'OWNERS = ("현장", "공용")' in py assert 'choice(["현장", "공용"]' in ui