Merge remote-tracking branch 'origin/dev' into main_laptop_1

This commit is contained in:
2026-09-16 11:28:12 +09:00
6 changed files with 109 additions and 21 deletions
+20 -1
View File
@@ -111,6 +111,21 @@ const withState = (state, current) => ({
const changedRow = withState("source_changed", 250000);
const sameRow = withState("edited", 270000);
const orphanRow = withState("orphan", undefined);
// 뜻 바뀜 — 번호는 그대로인데 줄이 딴 물건이 됨(노임 3001 문화재목공 → 한식목공)
const meaningRow = {
"@id": "labor_const/3001",
daily_wage_krw: 300000,
"@overrides": {
daily_wage_krw: {
original: 250000,
value: 300000,
current: 260000,
state: "meaning_changed",
was: "문화재목공",
now: "한식목공",
},
},
};
const wait = (ms, value, fail) =>
new Promise((ok, no) => setTimeout(() => (fail ? no(new Error(value)) : ok(value)), ms));
@@ -156,6 +171,7 @@ writeFileSync(process.argv[2], JSON.stringify({
cellInfo(meta, changedRow, "daily_wage_krw"),
cellInfo(meta, sameRow, "daily_wage_krw"),
cellInfo(meta, orphanRow, "daily_wage_krw"),
cellInfo(meta, meaningRow, "daily_wage_krw"),
],
parsed: [
parseCellInput("12,340", 100),
@@ -234,7 +250,7 @@ def test_칸_글자와_숨김_열(tmp_path: Path) -> None:
assert got["raceError"] == [None, "new"]
assert got["latestError"] == "thrown boom"
# 고칠 수 있는 칸 · 고쳐짐이면 원래 값 · 못 고치는 칸은 까닭과 식 · 줄마다 값 넣은 식
wage, hourly, plain, changed, same, orphan = got["info"]
wage, hourly, plain, changed, same, orphan, meaning = got["info"]
# state 가 안 온 고친 칸은 화면이 때우지 않고 「missing」으로 드러냄(서버 버그)
assert wage == {
"editable": True,
@@ -249,6 +265,9 @@ def test_칸_글자와_숨김_열(tmp_path: Path) -> None:
assert changed["state"] == "source_changed" and changed["current"] == 250000
assert same["state"] == "edited" and "current" not in same
assert orphan["state"] == "orphan"
# 뜻 바뀜 — 옛 이름·지금 이름을 나란히 보여야 사람이 딴 물건인지 가림
assert meaning["state"] == "meaning_changed" and meaning["current"] == 260000
assert meaning["was"] == "문화재목공" and meaning["now"] == "한식목공"
assert hourly["state"] is None and plain["state"] is None
assert hourly["editable"] is False and hourly["reason"] == "계산으로 나옴"
assert hourly["overridden"] is False and "original" not in hourly