- 새 `Sangeun_Side` — 일위대가 상세와 같은 서랍(`createSidePanels`) + 원문 보기(`createSourceView` · M02 길 `/m02/logic-lib/source` · 원문 다운로드) · 바탕 · 둘째 기초(더한줄 로직)마다 탭 · 기초 하나 = 탭 없음 · 바탕 없음 = 「원문 연결 없음」 · 넓은 화면(1500 이상)만 처음 열림 · 열림 · 폭 기억 `m02-sangeun-side` - Sangeun_Detail — 옵션 `source`(단가산출 화면 View 만 켬 · 줄 모달 RowSk 는 안 켬) · 「시험 계산 · 텍스트 수식 = 바탕 기초 + …」 안내 글 걷음(750-2 로 네 보기가 같은 답이라 낡음 · 키 M02_SangeunBaseViews 지움) - 낡은 시험 고침 — test_721_find_pick(안내 걷음) · 새 지킴 test_750_2 에 752-1 대조 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
44 lines
2.2 KiB
Python
44 lines
2.2 KiB
Python
"""750-2 화면 — 네 보기가 SK 셈 답 하나로(바탕 M01 로직 따로 셈 길 걷음) · 재료 고름 = 문서 `고름` ·
|
|
읽는 식 줄 = cid 로 이음 · 옵션 바꿈 = SK 셈 한 번(원문 대조는 서버 test_750_1)."""
|
|
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
|
|
|
|
def _ts(rel: str) -> str:
|
|
return (ROOT / rel).read_text("utf-8")
|
|
|
|
|
|
def test_detail_uses_only_sk_answer():
|
|
ts = _ts("M02_MasterTemplete/M02_MasterTemplete_Sangeun_Detail.ts")
|
|
assert "text = got.글" in ts and "answer: async" in ts and "shown: shownOf" in ts
|
|
assert "onText" not in ts and "onLines" not in ts # 바탕 `/calc` · `/text` 부름 걷음
|
|
assert "dropText" not in ts and "baseCovers" not in ts and "applyCovers" not in ts
|
|
assert "calcSangeun(scope, plain, values, false)" in ts # 바탕 원값 셈 = 보기 덧칸 없이
|
|
assert "doc.고름 = " in ts and "pickMat" in ts # 재료 고름 = SK 문서 고름
|
|
|
|
|
|
def test_text_lines_joined_by_cid():
|
|
ho = _ts("M01_MasterData/M01_MasterData_UI_LogicLab_Ho.ts")
|
|
assert "ctx.cids && line.cid" in ho and "pickMat" in ho
|
|
api = _ts("M01_MasterData/M01_MasterData_UI_Logic_Api.ts")
|
|
assert "cid?: string" in api and "나눔?: number" in api
|
|
|
|
|
|
def test_calc_view_answer_hook_skips_logic_lib():
|
|
ts = _ts("M01_MasterData/M01_MasterData_UI_Logic_Calc.ts")
|
|
assert "ctx.onText && !ctx.answer" in ts # 미리보기 안 부름
|
|
assert "if (ctx.answer)" in ts and "runCalc" in ts # M01 옛 길 그대로
|
|
|
|
|
|
def test_752_1_source_panel_only_on_sangeun_screen():
|
|
"""752-1 원문 패널 — 단가산출 화면만 켬 · 일위대가 줄 모달 안 상세는 끔 · 기초마다 탭 · 좁은 폭 접힘."""
|
|
side = _ts("M02_MasterTemplete/M02_MasterTemplete_Sangeun_Side.ts")
|
|
assert "/m02/logic-lib/source" in side and "createSidePanels" in side
|
|
assert "OPEN_FROM" in side and "createSegment" in side
|
|
assert "source: true" in _ts("M02_MasterTemplete/M02_MasterTemplete_Sangeun_View.ts")
|
|
assert "source" not in _ts("M02_MasterTemplete/M02_MasterTemplete_Labor_RowSk.ts")
|
|
detail = _ts("M02_MasterTemplete/M02_MasterTemplete_Sangeun_Detail.ts")
|
|
assert "opt.source ? createSangeunSide()" in detail and "side?.set(" in detail
|