"""계획노선 편집 겉틀 — 345-3 부터 모달이 아니라 종단 보기 가운데 위 본문(PLAN 127-1 의 공용 모달 조각은 걷음). · 덮개(`ui-modal__backdrop`) · 전체 화면 · 닫기 단추 없음 · 부모를 받아 붙음(`document.body` 아님) · [저장 전으로] 없음(352-2) · ↶ ↷ 는 기호 단추 · 머리 끝 `tools` 자리([3D]) · 오른쪽 횡단 미리보기 = 접는 칸 · 재계산 대기 막은 화면 전체(fixed) · R 라벨은 칸 안 절대 위치 · 바깥 누름 · Esc 로 안 닫힘(모달 아님) """ from __future__ import annotations import re from pathlib import Path ROOT = Path(__file__).resolve().parents[2] PAGE = ROOT / "B05_Profile" def _block(css: str, selector: str) -> str: found = re.search(rf"^{re.escape(selector)} \{{([^}}]*)\}}", css, re.M) assert found, selector return found.group(1) def _read(name: str) -> str: return (PAGE / name).read_text(encoding="utf-8") def test_겉틀은_본문_칸(): chrome = _read("B05_Profile_UI_RouteEdit_Chrome.ts") assert "ui-modal" not in chrome assert "document.body.append" not in chrome assert "parent.append(overlay);" in chrome assert 'overlay.className = "b05-routeedit";' in chrome assert "b05-routeedit__close" not in chrome and 'data-slot="close"' not in chrome assert '"tools"' in chrome and "replaceWith(...tools)" in chrome # 346-3 — [노선 반영] 없앰(노선은 페이지 [저장]이 맨 앞에서 보냄) · 352-2 — [저장 전으로] 없앰 assert 'data-act="apply"' not in chrome and 'data-act="cancel"' not in chrome assert ">저장 전으로" not in chrome and "노선 반영" not in chrome assert ">취소" not in chrome and ">확인" not in chrome # 352-2 — 되돌리기 · 다시하기 = 글 없이 기호 + aria-label · title(단축키) assert 'aria-label="되돌리기" disabled>↶' in chrome assert 'aria-label="다시하기" disabled>↷' in chrome assert 'title="되돌리기 (Ctrl+Z)"' in chrome and 'title="다시하기 (Ctrl+Y)"' in chrome # 시험 · 배선이 집는 자리는 남김 assert "b05-routeedit__measure-close" in chrome assert 'data-act="side-toggle"' in chrome and "is-collapsed" in chrome def test_CSS_덮개_걷음_대기막은_전체(): css = _read("B05_Profile_UI_Style_RouteEdit.css") root = _block(css, ".b05-routeedit") assert "position: relative;" in root and "flex: 1 1 auto;" in root assert "z-index" not in root and "background" not in root busy = _block(css, ".b05-routeedit__busy") assert "position: fixed;" in busy and "z-index: var(--z-modal, 1000);" in busy label = _block(css, ".b05-routeedit__label") assert "position: absolute;" in label and "position: fixed" not in label assert "display: none;" in _block( css, ".b05-routeedit__side-wrap.is-collapsed > .b05-routeedit__side" ) assert "@media (width < 1500px)" not in css # 접기는 단추로(처음만 폭으로) def test_352_1_머리줄_상자_없음_도구는_뜬_단추_횡단은_우측_덮개(): chrome = _read("B05_Profile_UI_RouteEdit_Chrome.ts") for gone in ("b05-routeedit__box", "b05-routeedit__head", "b05-routeedit__actions", "