- 화면: 「내역 점검」 카드 [단가 갱신] 단추 · 점 배지 · 호버 · 미리 보기 창([재생성] · [적용]) 걷음 · 연결 점검 목록 그대로 - 서버: POST …/estimation/prices · …/prices/preview 걷음(openapi 469 → 467) · GET 답 `book` · `stale` 칸(매 GET 단가 책 견줌) 걷음 - B09_Estimation_Refresh · B09_Estimation_Copy_Prices 지움(사본 단가 읽기 = 단가.json 바로) · Bill_Library 서고 다시 굳힘(changed · refresh_copy) 걷음 - 단가 책: 첫 굳힘 `make_book`(옛 refresh_book 의 단가 갱신 몫 · book_stale · book_diff · labor_editions 걷음) - 시험: 죽은 길만 보던 test_296 · test_703_3 지움 · 203_1 배지 · 795_4 ⑤ ⑥ · 719_2 서고 업데이트 지움 · 144 길 = 없음 확인 - test_253_3: B9-4 화면 꼴 뒤 낡은 단언(엑셀 꼴 식 글)을 작업량 값 줄로 고침 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
91 lines
4.2 KiB
Python
91 lines
4.2 KiB
Python
"""203-1 B09 좌측 「데이터 점검」 묶음(사용자 60번).
|
|
|
|
- 묶음 이름 = 내역 점검 · [단가 갱신] · 낡음 점 배지 없음(859-2)
|
|
- 「연결 점검」 탭 내용 = 묶음 안 목록(누르면 그 탭 그 줄) · 위 탭 줄에서 뺌
|
|
- 701-2 첫 화면 = 설계내역서 · 목록 머리 「빈 줄 n」 = 설계내역서 금액 모르는 줄(줄마다 하나 · 까닭 모음) ·
|
|
그 밖(호표 · 재료) = 「그 밖 확인 n곳」(탭 · 키마다 하나)
|
|
"""
|
|
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
if str(ROOT) not in sys.path:
|
|
sys.path.insert(0, str(ROOT))
|
|
|
|
from resources.tester.helper_b09_group_cards import TABS, run # noqa: E402
|
|
|
|
CHECK = "B09_Estimation/B09_Estimation_UI_Check.ts"
|
|
SHELL = (ROOT / "B09_Estimation/B09_Estimation_UI_Shell.ts").read_text("utf-8")
|
|
|
|
|
|
def test_연결_점검_탭_없음_첫_화면_설계내역서():
|
|
out = run(
|
|
[TABS],
|
|
"\nconsole.log(JSON.stringify({ ids: TABS.map(([t]) => t), names: TABS.map(([, n]) => n),"
|
|
" groups: TAB_GROUPS.map(([n]) => n), first: TABS[0][0] }));",
|
|
)
|
|
assert "check" not in out["ids"] and "연결 점검" not in out["names"] + out["groups"]
|
|
assert out["first"] == "cost" and out["groups"][0] == "공사원가계산서" # 엑셀 탭 차례 그대로
|
|
assert 'let current: TabId = "bill";' in SHELL
|
|
assert "buildCheck" not in SHELL and "check:" not in SHELL
|
|
|
|
|
|
def test_좌측_목록_이동_호버_배지():
|
|
out = run(
|
|
[TABS, CHECK],
|
|
"""
|
|
const moves = [];
|
|
const panel = createCheckPanel((link) => moves.push(link));
|
|
const sheets = {
|
|
bill: { rows: [
|
|
{ kind: "title", cost: "direct", key: "sec:1", name: "토공사", sum: null },
|
|
{ kind: "item", cost: "direct", key: "earth:3", name: "제근", sum: null },
|
|
{ kind: "item", cost: "direct", key: "earth:4", name: "절토", sum: 100 },
|
|
{ kind: "item", cost: "direct", key: "st:w", name: "옹벽", sum: null },
|
|
{ kind: "item", cost: "owner", key: "mat:1", name: "레미콘", sum: null },
|
|
] },
|
|
gaps: [
|
|
{ tab: "bill", key: "earth:3", name: "제근", why: "수량 연결 없음" },
|
|
{ tab: "bill", key: "earth:3", name: "제근", why: "준비공 대가 — 연결 없음" },
|
|
{ tab: "dg", key: "DG1", name: "찰쌓기", why: "대가 원천 없음" },
|
|
{ tab: "dg", key: "DG1", name: "찰쌓기", why: "대가 원천 없음" },
|
|
{ tab: "material", key: "MT9", name: "모래", why: "단가 없음" },
|
|
],
|
|
};
|
|
const payload = {
|
|
notes: ["B08 자재 집계표 못 읽음"], inputs: { missing: ["EQ1", "LB2"] } };
|
|
panel.draw(payload, sheets);
|
|
const view = () => ({
|
|
texts: panel.list.children.map((c) => c.text),
|
|
rows: [1, 3].flatMap((n) =>
|
|
(panel.list.children[n]?.children ?? []).map((r) => [r.dataset.i, r.className, r.text])),
|
|
});
|
|
const a = view();
|
|
const blankBox = panel.list.children[1];
|
|
const rowsBox = panel.list.children[3];
|
|
rowsBox.children[1].click();
|
|
const rowHover = hoverCalls.find((h) => h.root === panel.list);
|
|
const tipRow = rowHover.text(rowsBox.children[0]);
|
|
const tipBlank = [0, 1].map((n) => rowHover.text(blankBox.children[n]));
|
|
panel.draw({}, { gaps: [] });
|
|
const b = view();
|
|
console.log(JSON.stringify({ a, b, moves, tipRow, tipBlank, selector: rowHover.selector }));
|
|
""",
|
|
)
|
|
a, b = out["a"], out["b"]
|
|
# 빈 줄 = 직접공사 항목 중 금액 모름(관급 · 제목 · 아는 줄 빼고) · 같은 줄 까닭은 하나로
|
|
assert a["texts"][0] == "금액 빈 줄 2" and a["texts"][2] == "그 밖 확인 2곳"
|
|
assert a["rows"] == [
|
|
["0", "ui-sidebar-row", "제근설계내역서"],
|
|
["1", "ui-sidebar-row", "옹벽설계내역서"],
|
|
["2", "ui-sidebar-row", "찰쌓기일위대가표"],
|
|
["3", "ui-sidebar-row", "모래재료비목록표"],
|
|
]
|
|
assert out["tipBlank"][0] == "수량 연결 없음 · 준비공 대가 — 연결 없음"
|
|
assert out["tipBlank"][1].startswith("금액 모름") # 까닭 없는 빈 줄(이은 대가에 빈 줄)
|
|
assert a["texts"][4:] == ["B08 자재 집계표 못 읽음", "M01 에 없는 키 2 — EQ1 · LB2"]
|
|
assert out["moves"] == [{"tab": "material", "key": "MT9"}]
|
|
assert out["tipRow"] == "대가 원천 없음" and out["selector"] == "[data-i]"
|
|
assert b["texts"] == ["금액 빈 줄 0"] and b["rows"] == []
|