From a2619cbc40bd7c87b14f37e8ee461301573e64ff Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sun, 15 Nov 2026 17:07:22 +0900 Subject: [PATCH] =?UTF-8?q?test(841-2):=20B09=20=EC=8B=9C=ED=97=98=20?= =?UTF-8?q?=EC=8B=A4=ED=8C=A8=20=EA=B0=80=EB=A6=84=20=E2=80=94=20=EB=82=A1?= =?UTF-8?q?=EC=9D=80=20=ED=8B=80=20=C2=B7=20=EB=82=A1=EC=9D=80=20=EA=B8=B0?= =?UTF-8?q?=EB=8C=80=20=EA=B3=A0=EC=B9=A8(=EC=BD=94=EB=93=9C=20=ED=9D=A0?= =?UTF-8?q?=200)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ㉠ 시험 틀 낡음 — 공용 원화 꼴(751-2 common_util_money.ts formatMoney · formatPrice)로 옮겨진 뒤 TS 를 import 떼고 이어 돌리는 틀에 그 함수가 없음 - test_184_3 money_ts()(함수 속에 넣어 이름 겹침 0) · 145-4 · 166-1 · 183-3 · 185-1 · 239-1(184-3 틀) · 261-2 가 같이 붙임 ㉠ 기대 글 낡음 - 155-5 · 157-1: 801-5 M01 단위 표기(「mm」 → 「㎜」 · 찾기 값 「20 sec」) - 243-1: 719-4 산근 계산서 표(제 표 · 두 번 눌러 고침)가 표 목록에 빠짐 → 더하고 editOnDouble 지킴 - 246-2: 공용 메뉴 「▾」 = 요구 551 여럿 고르기 단추 꼬리(다른 기능) → 옛 아코디언 표지만 봄 - 311: B05 「노선 추천」 칸 626-1 걷음 → 접힘 기대에서 뺌 ㉡ 걷은 기능 시험 · ㉢ 코드 흠 — 없음 - B09 이름 든 51 파일 + 위 다섯 + 717-4 · 721 = 315 통과 · 실패 0(717-4 · 721 = sub1 고침 받은 판 통과) · 719-1 · 796-2e = sub4 몫이라 안 만짐 Co-Authored-By: Claude Opus 5.5 --- resources/tester/test_145_4_b09_total_calc.py | 3 +++ resources/tester/test_155_5_sangeun_text.py | 6 +++++- resources/tester/test_157_1_sangeun_steps.py | 2 +- resources/tester/test_166_1_b09_rate_auto.py | 4 +++- resources/tester/test_183_3_b09_applied_pick.py | 4 +++- resources/tester/test_184_3_b09_bill_menu.py | 10 +++++++++- resources/tester/test_185_1_b09_total_level.py | 4 +++- resources/tester/test_243_1_double_click_tables.py | 5 ++++- resources/tester/test_246_2_context_submenu_side.py | 3 ++- resources/tester/test_261_2_b09_cost_link_targets.py | 4 +++- resources/tester/test_311_panel_folded.py | 8 +++----- 11 files changed, 39 insertions(+), 14 deletions(-) diff --git a/resources/tester/test_145_4_b09_total_calc.py b/resources/tester/test_145_4_b09_total_calc.py index 0a04a8d18..9cb8b848f 100644 --- a/resources/tester/test_145_4_b09_total_calc.py +++ b/resources/tester/test_145_4_b09_total_calc.py @@ -17,6 +17,8 @@ ROOT = Path(__file__).resolve().parents[2] if str(ROOT) not in sys.path: sys.path.insert(0, str(ROOT)) +from test_184_3_b09_bill_menu import money_ts # noqa: E402 — 공용 원화 꼴 틀 + from B09_Estimation.B09_Estimation_Calc_Total import CURRENT_ONLY, compute_total # noqa: E402 from B09_Estimation.B09_Estimation_Rates import rate_candidates # noqa: E402 @@ -177,6 +179,7 @@ def test_화면_탭_요율_손입력_칸(): ) ] body = f""" +{money_ts()} let user = {{ estimate: {json.dumps(ESTIMATE)} }}; const setUser = (u) => (user = u); const sums = {json.dumps(SUMS)}; diff --git a/resources/tester/test_155_5_sangeun_text.py b/resources/tester/test_155_5_sangeun_text.py index 659abbc33..240e8c576 100644 --- a/resources/tester/test_155_5_sangeun_text.py +++ b/resources/tester/test_155_5_sangeun_text.py @@ -53,7 +53,11 @@ def _prices(labor): def test_엑셀_6호표_뒷채움_같은_글(): whole = _whole(_excel("0.018", "0.07")) got = st.render_sangeun_text(whole, BASE, GIVEN, _prices({"LB000002": 165545})) - assert got[:3] == ["기초다짐 및 뒷채움(기계) / ㎥", "산림품셈 13-3-2 적용", "규격 : 150 mm"] + assert got[:3] == [ + "기초다짐 및 뒷채움(기계) / ㎥", + "산림품셈 13-3-2 적용", + "규격 : 150 ㎜", + ] # 801-5 단위 assert got[-5:] == [ "보통인부 : 165,545 * 0.018 = 2,979.8", "굴착기(무한궤도) 0.2㎥ 노무비 : 55,700 * 0.07 = 3,899.0", diff --git a/resources/tester/test_157_1_sangeun_steps.py b/resources/tester/test_157_1_sangeun_steps.py index 96c4591e5..a2cf661cd 100644 --- a/resources/tester/test_157_1_sangeun_steps.py +++ b/resources/tester/test_157_1_sangeun_steps.py @@ -53,7 +53,7 @@ def test_돈_아닌_하위_로직_풀이_찾기_결과식(): "└ K = 토사깍기 기계(구분 = K).적용 = 0.9", "└ f = 토사깍기 체적환산계수(구분 = f).적용 = 0.77", "└ E = E입력 = 0.45", - "└ Cm = 토사깍기 기계(구분 = ㎝(sec)).적용 = 20", + "└ Cm = 토사깍기 기계(구분 = ㎝(sec)).적용 = 20 sec", # 801-5 M01 단위 표기 "└ 결과 = 반올림(3,600 * q * K * f * E / Cm, 3) = " "반올림(3,600 * 0.7 * 0.9 * 0.77 * 0.45 / 20, 3) = 39.293", ] diff --git a/resources/tester/test_166_1_b09_rate_auto.py b/resources/tester/test_166_1_b09_rate_auto.py index 639781824..a6298110c 100644 --- a/resources/tester/test_166_1_b09_rate_auto.py +++ b/resources/tester/test_166_1_b09_rate_auto.py @@ -15,6 +15,8 @@ ROOT = Path(__file__).resolve().parents[2] if str(ROOT) not in sys.path: sys.path.insert(0, str(ROOT)) +from test_184_3_b09_bill_menu import money_ts # noqa: E402 — 공용 원화 꼴 틀 + from B09_Estimation.B09_Estimation_Calc_Total import CURRENT_ONLY, compute_total # noqa: E402 from B09_Estimation.B09_Estimation_Rates import rate_table # noqa: E402 @@ -224,7 +226,7 @@ console.log(JSON.stringify(out)); "B09_Estimation_UI_Tabs.ts", "B09_Estimation_UI_Tabs_Total.ts", ) - out = json.loads(_node(_source(*names) + body)) + out = json.loads(_node(money_ts() + _source(*names) + body)) assert out["editable"] == [True, True, False] assert out["blank"] is None # 고르는 값 빈칸 = 간노 자동 없음 assert out["price"] == 1_000_000_000 diff --git a/resources/tester/test_183_3_b09_applied_pick.py b/resources/tester/test_183_3_b09_applied_pick.py index 533f89669..ea6827d02 100644 --- a/resources/tester/test_183_3_b09_applied_pick.py +++ b/resources/tester/test_183_3_b09_applied_pick.py @@ -26,6 +26,8 @@ def _node(script: str): return json.loads(out.stdout) +from test_184_3_b09_bill_menu import money_ts # noqa: E402 — 공용 원화 꼴 틀 + PRELUDE = f""" const fs = require("fs"); const ts = require({json.dumps(str(TS))}); @@ -70,7 +72,7 @@ def test_고르기_항목_값_있는_출처_견적_최저_자동(): got = _node( PRELUDE + f""" -const appliedChoices = new Function(js({json.dumps(line.replace("export ", "") + body)}) + "; return appliedChoices;")(); +const appliedChoices = new Function(js({json.dumps(money_ts() + line.replace("export ", "") + body)}) + "; return appliedChoices;")(); const r = {{ prices: {{ 관급: null, 물가정보: 1200, 물가자료: 0, 유통물가: 1000, 견적: 1500 }}, lowest_from: "유통물가", applied_from: "유통물가", pick: null }}; const seen = []; diff --git a/resources/tester/test_184_3_b09_bill_menu.py b/resources/tester/test_184_3_b09_bill_menu.py index 83e0d1a6a..37f61e336 100644 --- a/resources/tester/test_184_3_b09_bill_menu.py +++ b/resources/tester/test_184_3_b09_bill_menu.py @@ -88,8 +88,16 @@ def _node(source: str) -> str: return result.stdout +def money_ts() -> str: + """공용 원화 꼴(751-2 `common_util_money.ts`) — import 를 떼어 돌리는 틀에 넣음(함수 속 · 겹침 0).""" + src = (ROOT / "common_util" / "common_util_money.ts").read_text("utf-8") + names = "formatNumber, formatMoney, formatLineMoney, formatPrice" + body = src.replace("export function", "function") + return f"const {{ {names} }} = (() => {{\n{body}\nreturn {{ {names} }};\n}})();\n" + + def _ts(names: list[str]) -> str: - return "".join( + return money_ts() + "".join( IMPORTS.sub("", (ROOT / "B09_Estimation" / f"B09_Estimation_{n}.ts").read_text("utf-8")) for n in names ) diff --git a/resources/tester/test_185_1_b09_total_level.py b/resources/tester/test_185_1_b09_total_level.py index 5ba5c8e07..697d66a58 100644 --- a/resources/tester/test_185_1_b09_total_level.py +++ b/resources/tester/test_185_1_b09_total_level.py @@ -13,6 +13,8 @@ from pathlib import Path ROOT = Path(__file__).resolve().parents[2] B09 = ROOT / "B09_Estimation" +from test_184_3_b09_bill_menu import money_ts # noqa: E402 — 공용 원화 꼴 틀 + IMPORTS = re.compile(r"^import[^;]*;\n", re.MULTILINE) SUMS = {"material": 194234417, "labor": 346800554, "expense": 169324165, "supply_net": 69474220} @@ -28,7 +30,7 @@ console.log(JSON.stringify({{ total: pack(T), cost: pack(C), fixed: {{ total: T. def _run() -> dict: names = ("Calc_Base", "Calc_Total", "UI_Tabs", "UI_Tabs_Total") - script = "".join( + script = money_ts() + "".join( IMPORTS.sub("", (B09 / f"B09_Estimation_{n}.ts").read_text(encoding="utf-8")) for n in names ) result = subprocess.run( diff --git a/resources/tester/test_243_1_double_click_tables.py b/resources/tester/test_243_1_double_click_tables.py index 5a4dc083e..5b7e1a3d8 100644 --- a/resources/tester/test_243_1_double_click_tables.py +++ b/resources/tester/test_243_1_double_click_tables.py @@ -113,13 +113,16 @@ def test_B09_표_만드는_길_한_곳_더블클릭_기본(): p.name for p in _sources("B09_Estimation") if "createDataTable({" in p.read_text("utf-8") ] # 303-2 팝업 창 · 707-1 불러오기 어긋난 줄 · 707-2 · 3 확인 창 = 보기 전용(고칠 칸 없음) · - # 옵션 = 같은 표 짜기(Builders) · 702-1 펼침 표 = 제 표(두 번 눌러 고침) + # 옵션 = 같은 표 짜기(Builders) · 702-1 펼침 표 · 719-4 산근 계산서 표 = 제 표(두 번 눌러 고침) assert calls == [ "B09_Estimation_UI_Import.ts", "B09_Estimation_UI_Popup.ts", "B09_Estimation_UI_Shell.ts", "B09_Estimation_UI_Tabs_Bill_Fold.ts", + "B09_Estimation_UI_Tabs_Sangeun_Sheet.ts", ] + sheet = (ROOT / "B09_Estimation" / calls[4]).read_text("utf-8") + assert "editOnDouble: true," in sheet assert "editable" not in (ROOT / "B09_Estimation" / calls[0]).read_text("utf-8") fold = (ROOT / "B09_Estimation" / calls[3]).read_text("utf-8") assert "editOnDouble: true," in fold diff --git a/resources/tester/test_246_2_context_submenu_side.py b/resources/tester/test_246_2_context_submenu_side.py index f0bdc831c..aae211ce8 100644 --- a/resources/tester/test_246_2_context_submenu_side.py +++ b/resources/tester/test_246_2_context_submenu_side.py @@ -160,7 +160,8 @@ def test_옆_판_열기_닫기_자리(): def test_옛_아코디언_없음_공용_꼴(): src = _src() - assert "ui-ctx-menu__sub" not in src and "▾" not in src and "is-sub" not in src + # 「▾」 = 요구 551 여럿 고르기 단추 꼬리(다른 기능) — 옛 아코디언 표지만 봄 + assert "ui-ctx-menu__sub" not in src and "is-sub" not in src css = (ROOT / "ui_template" / "ui_template_context_menu.css").read_text("utf-8") assert ".ui-ctx-menu__sub" not in css and ".ui-ctx-menu__item.is-open" in css # B09 연결 = children 꼴 그대로(공용 메뉴가 옆 판으로) diff --git a/resources/tester/test_261_2_b09_cost_link_targets.py b/resources/tester/test_261_2_b09_cost_link_targets.py index 7b6db0414..f6cc2a57f 100644 --- a/resources/tester/test_261_2_b09_cost_link_targets.py +++ b/resources/tester/test_261_2_b09_cost_link_targets.py @@ -11,6 +11,8 @@ from pathlib import Path ROOT = Path(__file__).resolve().parents[2] B09 = ROOT / "B09_Estimation" +from test_184_3_b09_bill_menu import money_ts # noqa: E402 — 공용 원화 꼴 틀 + IMPORTS = re.compile(r"^import[^;]*;\n", re.MULTILINE) SUMS = {"material": 194234417, "labor": 346800554, "expense": 169324165, "supply_net": 69474220} @@ -28,7 +30,7 @@ console.log(JSON.stringify({{ def _run() -> dict: names = ("Calc_Base", "Calc_Total", "UI_Tabs", "UI_Tabs_Total") - script = "".join( + script = money_ts() + "".join( IMPORTS.sub("", (B09 / f"B09_Estimation_{n}.ts").read_text(encoding="utf-8")) for n in names ) result = subprocess.run( diff --git a/resources/tester/test_311_panel_folded.py b/resources/tester/test_311_panel_folded.py index ca9729091..ffe2da0b6 100644 --- a/resources/tester/test_311_panel_folded.py +++ b/resources/tester/test_311_panel_folded.py @@ -3,7 +3,7 @@ 못박는 것 - 기본 접힘(389-3) = 좌측 카드 전부 — B09 「데이터 점검」 · 「공기 옵션」 · 인쇄 둘 / B07 묶음 여섯 / - B06 「횡단 보기 설정」 / B05 「페이지 설정」 · 「노선 추천」 · 「구조물 배치」 / B08 · M02 집계 양식. + B06 「횡단 보기 설정」 / B05 「페이지 설정」 · 「구조물 배치」 / B08 · M02 집계 양식. - 쪽 안에서 편 것은 다시 그려도 그대로 — B05 · B06 = 한 벌 패널이 칸을 한 번만 세움 · B07 = 다시 세울 때 옛 목록 접힘을 이어 받음 · B09 = 좌측 패널을 쪽 그릴 때 한 번만 세움. - B07 처음 들어가면 표지 — 고른 장 기억(모듈 값 `reopenDrawingId` · `reopenCrossSheet`)이 있으면 그 장. @@ -40,10 +40,8 @@ def out(): def test_B05_B06_첫_그림_접힘(out): - assert out["profileFirst"] == { - "페이지 설정": True, - "노선 추천": True, # 389-3 모든 좌측 카드 기본 닫힘 - } + # 389-3 모든 좌측 카드 기본 닫힘 · 「노선 추천」 칸 = 626-1 걷음(평면 도구줄 미리보기로) + assert out["profileFirst"] == {"페이지 설정": True} assert out["crossFirst"]["B06_View_Title"] is True assert out["crossFirst"]["B06_Std_Title"] is True # 옛 기본 접힘 그대로