From 854a3016dd03602b6154684572517f2be3ea4ede Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sat, 17 Oct 2026 15:37:30 +0900 Subject: [PATCH] =?UTF-8?q?test(B06=20=ED=9A=A1=EB=8B=A8):=20=EC=8B=9C?= =?UTF-8?q?=ED=97=98=20=EB=91=98=20=EC=A7=80=EA=B8=88=20=EA=B8=B8=EB=A1=9C?= =?UTF-8?q?=20=EB=A7=9E=EC=B6=A4=20=E2=80=94=20=EC=83=81=EC=84=B8=20?= =?UTF-8?q?=EA=B0=95=EC=A1=B0=20=ED=9D=89=EB=82=B4=20:not=20=C2=B7=20?= =?UTF-8?q?=ED=98=95=EC=83=81=20=EA=B3=A0=EB=A6=84=20splitPipePick=20(379-?= =?UTF-8?q?4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - helper_150 가짜 선택자가 :not(.class) 를 읽게 — 370-3 암 판정 선 뺌 뒤 측구 · 사면 · 노면 강조가 빈 목록으로 보이던 것(실제 화면 흠 아님) - test_294_1 형상 고름 길 = 307 에서 옮긴 splitPipePick(키 "pipe" · 형상 직접 누름)로 확인 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_014utrjfoW831Vc5wJUd13kL --- resources/tester/helper_150_detail_pick.cjs | 9 ++++++--- resources/tester/test_294_1_chute_remove_pick.py | 7 ++++++- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/resources/tester/helper_150_detail_pick.cjs b/resources/tester/helper_150_detail_pick.cjs index b6ed3c7af..ab212774b 100644 --- a/resources/tester/helper_150_detail_pick.cjs +++ b/resources/tester/helper_150_detail_pick.cjs @@ -29,7 +29,7 @@ function loadTs(full) { } const pick = loadTs(path.join(ROOT, "B06_Section", "B06_Section_UI_Cross_Detail_Pick.ts")); -// ── 그림 복제 흉내 — 평평한 요소 목록 · 「tag.class」 · 「.class」 · 「g.class line」 만 ── +// ── 그림 복제 흉내 — 평평한 요소 목록 · 「tag.class」 · 「.class」 · 「g.class line」 · 「:not(.class)」 만 ── function node(tag, classes, attrs = {}, parent = null) { const set = new Set(classes); return { @@ -45,8 +45,11 @@ function node(tag, classes, attrs = {}, parent = null) { }; } const one = (el, part) => { - const [tag, ...cls] = part.split("."); - return (!tag || el.tag === tag) && cls.every((c) => el.set.has(c)); + const nots = [...part.matchAll(/:not\(\.([\w-]+)\)/g)].map((m) => m[1]); // 370-3 암 판정 선 뺌 + const [tag, ...cls] = part.replace(/:not\([^)]*\)/g, "").split("."); + return ( + (!tag || el.tag === tag) && cls.every((c) => el.set.has(c)) && !nots.some((c) => el.set.has(c)) + ); }; const matches = (el, selector) => { const parts = selector.split(" "); diff --git a/resources/tester/test_294_1_chute_remove_pick.py b/resources/tester/test_294_1_chute_remove_pick.py index d13c77ab5..666640881 100644 --- a/resources/tester/test_294_1_chute_remove_pick.py +++ b/resources/tester/test_294_1_chute_remove_pick.py @@ -65,4 +65,9 @@ def test_형상_고름_길_그대로(): view = (ROOT / "B06_Section" / "B06_Section_UI_Cross_View.ts").read_text(encoding="utf-8") # 물넘이 콘크리트 · 맹암거 형상 누름 = 관 지점 고름 키 "pipe"(287-5) · 다시 누름 = 풂(toggle) assert 'shapePickRoute(svg, (at) => toggleRevet("pipe", at))' in view - assert 'setShapeActive(key === "pipe");' in view + # 형상 켬 = 키 "pipe" 이고 형상을 직접 누른 고름(307 — `splitPipePick` 로 옮김) + assert "splitPipePick(setRevetActive, setShapeActive, shapePicked)" in view + shape = (ROOT / "B06_Section" / "B06_Section_UI_Cross_Shape_Pick.ts").read_text( + encoding="utf-8" + ) + assert 'const shape = key === "pipe" && concrete();' in shape