Merge remote-tracking branches 'origin/sub_laptop_1' and 'origin/sub_laptop_3' into main_laptop_1

This commit is contained in:
2026-10-28 07:10:58 +09:00
16 changed files with 162 additions and 185 deletions
+4 -3
View File
@@ -52,10 +52,11 @@ global.document = { createElement: (tag) => new FakeNode(tag) };
const modals = [];
const STUBS = {
"@ui/ui_template_elements": {
createButton: ({ label, onClick }) => {
"@ui/ui_template_map_tools": {
mapToolButton: (act, { title, onClick }) => {
const button = new FakeNode("button");
button.label = label;
button.act = act;
button.title = title;
if (onClick) button.addEventListener("click", onClick);
return button;
},
@@ -28,15 +28,13 @@ def _rule(selector: str) -> str:
def test_도움말_기본_접힘_펼침_기억() -> None:
assert "let hintOpen = false;" in CHROME # 기본 접힘 · 모듈 값 = 페이지 동안 기억
assert 'data-act="hint-toggle" aria-expanded="false"' in CHROME and ">?</button>" in CHROME
assert "hintOpen = open;" in CHROME and 'hint.classList.toggle("is-open", open);' in CHROME
assert "setHint(hintOpen);" in CHROME
assert 'hintToggle.addEventListener("click", () => setHint(!hintOpen));' in CHROME
# 접힘 = 몸통 없음 · 펼침 = 2열 · 단추만 클릭 받음
assert "display: none;" in _rule(".b05-routeedit__hint-body")
assert "display: grid;" in _rule(".b05-routeedit__hint.is-open > .b05-routeedit__hint-body")
assert "pointer-events: auto;" in _rule(".b05-routeedit__hint-toggle.ui-btn[data-size]")
assert "pointer-events: none;" in _rule(".b05-routeedit__hint")
# 568-2 — [?] 단추 · 안내 판 = 공용 지도 도구줄(접힘 · 2열 · 클릭 통과는 test_568_1)
assert (
"hint: { lines: HINT_LINES, open: hintOpen, onToggle: (open) => (hintOpen = open) }"
in CHROME
)
assert 'mapTools.hint!.classList.add("b05-routeedit__hint")' in CHROME # 가이드 촬영 선택자
assert '"Ctrl+휠 = 돌리기(한 칸 5°)",' in CHROME
def test_상태_범례_접기_한_줄_기억() -> None:
@@ -63,7 +61,8 @@ def test_상태_글판_작게_반투명_자리() -> None:
# 상태 글 두 줄에서 자름 · 범례는 옆 칸 두 줄
assert "-webkit-line-clamp: 2;" in _rule(".b05-routeedit__status")
assert "flex-direction: column;" in _rule(".b05-routeedit__legend")
glass = _rule(".b05-routeedit__hint-body,\n.b05-routeedit__info")
glass = CSS[CSS.index("\n.b05-routeedit__info {") :]
glass = glass[: glass.index("}")]
assert "color-mix(in srgb, var(--color-surface-raised) 72%, transparent)" in glass
assert not re.search(r"#[0-9a-fA-F]{3,6}\b", glass) # 바탕 · 글 색은 토큰
@@ -104,7 +104,7 @@ def test_편집기가_발자국을_그리고_단추로_켬끔() -> None:
# 등고선 뒤 · 노선 앞(노선이 발자국 위에 보임)
assert render.index("drawFootprint(context") < render.index("scene.expected,")
chrome = (B05 / "B05_Profile_UI_RouteEdit_Chrome.ts").read_text(encoding="utf-8")
assert 'data-act="footprint"' in chrome and "bindFootprintToggle(" in chrome
assert 'mapToolButton("footprint"' in chrome and "bindFootprintToggle(" in chrome
footprint = (B05 / "B05_Profile_UI_RouteEdit_Footprint.ts").read_text(encoding="utf-8")
assert 'subscribe("footprint"' in footprint and "let shown = true;" in footprint
css = (B05 / "B05_Profile_UI_Style_RouteEdit_Footprint.css").read_text(encoding="utf-8")
@@ -195,5 +195,5 @@ def test_깎기_쌓기_바뀜_자리는_도로_끝(pieces) -> None:
def test_단추_이름은_절성토선() -> None:
chrome = (ROOT / "B05_Profile" / "B05_Profile_UI_RouteEdit_Chrome.ts").read_text("utf-8")
at = chrome.index('data-act="footprint"')
assert ">절/성토선</button>" in chrome[at : at + 200] and ">발자국<" not in chrome
at = chrome.index('mapToolButton("footprint"')
assert 'title: "절/성토선 — ' in chrome[at : at + 200] and "발자국" not in chrome
+1 -1
View File
@@ -124,7 +124,7 @@ def test_draw_values_are_literal_hex():
assert draws, mode
for name, value in draws.items():
assert HEX.fullmatch(value), (mode, name, value)
assert len([k for k in blocks["light"] if k.startswith("--draw-")]) == 24
assert len([k for k in blocks["light"] if k.startswith("--draw-")]) == 21
def test_drawing_css_uses_no_screen_tokens():
+25 -26
View File
@@ -209,40 +209,39 @@ def test_노선_추천_다듬기_23_3():
return open(os.path.join(page, name), encoding="utf-8").read()
chrome = read("B05_Profile_UI_RouteEdit_Chrome.ts")
# 366-2 — [?] | ↶ ↷ | 3D | ⟲ ⟳ · 1m 등고선 · 절/성토선 · 거리 재기 | 측점 스냅 · 간격 | 분석 지형(맨 오른쪽)
# 366-2 · 568-2 — [?] | ↶ ↷ | 3D | ⟲ ⟳ · 1m 등고선 · 측점 · 기울기 · 절/성토선 · 거리 재기 | 측점 스냅 · 간격 |
# 설계 지형 이름(맨 오른쪽) — 공용 지도 도구줄 묶음 차례([?] 는 hint 가 맨 앞에 붙임)
bar = chrome[
chrome.index("b05-routeedit__tools") : chrome.index('<div class="b05-routeedit__hint">')
chrome.index("createMapTools({") : chrome.index('classList.add("b05-routeedit__tools")')
]
order = [
'data-act="hint-toggle"',
"|",
'data-act="undo"',
'data-act="redo"',
"|",
'data-slot="tools"',
"|",
'data-act="rotate-ccw"',
'data-act="rotate-cw"',
'data-act="contour-minor"',
'data-act="stations"', # 381-2 [측점] [기울기] = 절/성토선 왼쪽
'data-act="slopes"',
'data-act="footprint"',
'data-act="measure"',
"|",
'data-act="station-snap"',
'data-act="snap-step"', # 390-2 스냅 간격 = [측점 스냅] 오른쪽
"|", # 390-1 [측점 스냅] | 설계 지형 이름(509-5)
'class="b05-routeedit__terrain" data-slot="terrain-name" hidden',
"hint: { lines: HINT_LINES",
"groups: [",
'mapToolButton("undo"',
'mapToolButton("redo"',
"],",
"tools, // 부른 쪽 단추([3D])",
'"rotate-ccw",',
'"rotate-cw",',
'mapToolButton("contour-minor"',
'mapToolButton("stations"', # 381-2 [측점] [기울기] = 절/성토선 왼쪽
'mapToolButton("slopes"',
'mapToolButton("footprint"',
'mapToolButton("measure"',
"],",
'mapToolButton("station-snap"',
"snapStep,", # 390-2 스냅 간격 = [측점 스냅] 오른쪽
"],", # 390-1 [측점 스냅] | 설계 지형 이름(509-5)
"[terrainName],",
]
at = 0
for mark in order:
key = "b05-route__view-separator" if mark == "|" else mark
at = bar.index(key, at) + 1
assert bar.count("b05-route__view-separator") == 5
assert chrome.count("b05-route__view-separator") == 5
at = bar.index(mark, at) + 1
assert 'class="b05-routeedit__terrain" data-slot="terrain-name" hidden' in chrome
assert "b05-route__view-separator" not in chrome # 나눔선 = 공용 도구줄
# 분석 지형이 숨으면 앞 구분선도 숨김 · 스냅 끔이면 간격 고르기 흐림
style = read("B05_Profile_UI_Style_RouteEdit.css")
assert ".b05-route__view-separator:has(+ .b05-routeedit__terrain[hidden])" in style
assert ".ui-toolbar__divider:has(+ .b05-routeedit__terrain[hidden])" in style
assert '[data-act="station-snap"][aria-pressed="false"] + .b05-routeedit__snap-step' in style
assert "b05-routeedit__spin" not in chrome # 회전 = 도구줄(추천 모달 CSS 는 남음)
shared = read("B05_Profile_UI_RouteEdit_Recommend_Map.ts")