test(B06 횡단): 시험 둘 지금 길로 맞춤 — 상세 강조 흉내 :not · 형상 고름 splitPipePick (379-4)
- helper_150 가짜 선택자가 :not(.class) 를 읽게 — 370-3 암 판정 선 뺌 뒤 측구 · 사면 · 노면 강조가 빈 목록으로 보이던 것(실제 화면 흠 아님) - test_294_1 형상 고름 길 = 307 에서 옮긴 splitPipePick(키 "pipe" · 형상 직접 누름)로 확인 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014utrjfoW831Vc5wJUd13kL
This commit is contained in:
@@ -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(" ");
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user