Merge remote-tracking branch 'origin/sub_laptop_2' into main_laptop_1
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
"""258 · 425 — B06 위 평면 겹침 패널.
|
||||
"""258 · 425 · 436 — B06 위 평면 겹침 패널.
|
||||
|
||||
종단 보기 평면 노드를 옮겨 붙임(둘째 캔버스 없음) · 닫을 때 · 횡단 숨김 때 제자리 · 손잡이 =
|
||||
공용 bottom 위로 접힘 · z 4 · 높이 45 % · 편집 도구 감춤 · 가운데 버튼 팬 · 휠만(편집 누름 막음) ·
|
||||
평면 방향키는 B05 평면 안에서만. 배선은 글로 봄.
|
||||
공용 bottom 위로 접힘 · z 4 · 처음 높이 32 % · 아래 끝 끌어 높이(화면 기억) · 단추 줄 · 안내 등 감춤 ·
|
||||
조작(끌기 · 끼우기 · 지우기 · 방향키 · 휠 · 팬)은 B05 평면 그대로 · 처음 보일 때 B05 칸 크기로 셈.
|
||||
배선은 글로 봄.
|
||||
./venv/Scripts/python.exe -m pytest resources/tester/test_258_b06_plan_peek.py -q
|
||||
"""
|
||||
|
||||
@@ -41,19 +42,33 @@ def test_평면_노드를_옮기고_제자리로() -> None:
|
||||
assert len(PEEK.splitlines()) <= 700
|
||||
|
||||
|
||||
def test_편집_누름은_막고_팬_휠은_통과() -> None:
|
||||
down = PEEK[PEEK.index('"pointerdown"') :]
|
||||
down = down[: down.index("true,")]
|
||||
assert "if (event.button !== 1) event.stopPropagation();" in down
|
||||
assert 'for (const type of ["dblclick", "contextmenu"])' in PEEK
|
||||
assert '"wheel"' not in PEEK # 휠 확대는 캔버스 그대로
|
||||
def test_조작은_B05_평면_그대로() -> None:
|
||||
# 패널이 누름 · 휠을 가로채지 않음 — 캔버스에 붙은 B05 처리기가 그대로 받음
|
||||
for event in ('"pointerdown"', '"dblclick"', '"contextmenu"', '"wheel"', '"keydown"'):
|
||||
assert event not in PEEK
|
||||
assert "stopPropagation" not in PEEK
|
||||
|
||||
|
||||
def test_높이_끌기와_기억() -> None:
|
||||
assert "createPanelResizer({" in PEEK
|
||||
assert 'cssVar: "--design-plan-peek-height",' in PEEK and "direction: 1," in PEEK
|
||||
assert 'storageKey: stateKey("plan-peek-height")' in PEEK
|
||||
assert "max: () => (root.offsetParent?.clientHeight ?? 0) - 48," in PEEK
|
||||
assert "resizer.restore();" in PEEK[PEEK.index("const open = async") :]
|
||||
state = (ROOT / "A00_Common" / "b_page_state.ts").read_text(encoding="utf-8")
|
||||
assert '"plan-peek-height": { bucket: "pref", scope: "global" },' in state
|
||||
handle = _rule(".design-plan-peek > .ui-resizer")
|
||||
assert "bottom: -3px;" in handle and "display: none;" in handle
|
||||
assert "display: block;" in _rule(".design-plan-peek.is-open > .ui-resizer")
|
||||
|
||||
|
||||
def test_겹침_자리와_감춤() -> None:
|
||||
root = _rule(".design-plan-peek")
|
||||
assert "position: absolute;" in root and "z-index: 4;" in root
|
||||
assert "pointer-events: none;" in root # 닫힌 동안 카드 누름 통과
|
||||
assert "height: 45%;" in _rule(".design-plan-peek.is-open")
|
||||
assert "height: var(--design-plan-peek-height, max(32%, 160px));" in _rule(
|
||||
".design-plan-peek.is-open"
|
||||
)
|
||||
hidden = CSS[CSS.index(".design-plan-peek .b05-routeedit__tools,") :]
|
||||
hidden = hidden[: hidden.index("}")]
|
||||
for part in ("__tools", "__info", "__measure", "__side-wrap", "b05-contourlock"):
|
||||
@@ -61,8 +76,18 @@ def test_겹침_자리와_감춤() -> None:
|
||||
assert "display: none;" in hidden
|
||||
|
||||
|
||||
def test_평면_방향키는_B05_평면_안만() -> None:
|
||||
def test_평면_방향키는_마지막_누름이_평면_안() -> None:
|
||||
for name in ("B05_Profile_UI_RouteEdit_Keys.ts", "B05_Profile_UI_RouteEdit_StructureMarks.ts"):
|
||||
text = (B05 / name).read_text(encoding="utf-8")
|
||||
assert 'lastPointerWithin(".b05-route__main .b05-routeedit")' in text
|
||||
assert 'lastPointerWithin(".b05-routeedit")' not in text
|
||||
assert 'lastPointerWithin(".b05-routeedit")' in text # 겹침 평면도(436)
|
||||
assert ".b05-route__main .b05-routeedit" not in text
|
||||
|
||||
|
||||
def test_처음_보일_때_B05_칸_크기로_셈() -> None:
|
||||
editor = (B05 / "B05_Profile_UI_RouteEdit.ts").read_text(encoding="utf-8")
|
||||
body = editor[editor.index("function openView(): void {") :]
|
||||
body = body[: body.index("\n }")]
|
||||
assert 'const atHome = overlay.closest(".b05-route__main") !== null;' in body
|
||||
assert 'atHome ? null : overlay.closest(".design-page__center")' in body
|
||||
assert "openingView(projectId, meta, home," in body
|
||||
assert "restoreSavedView(meta, view, captureView(meta, opening.view, 0))" in body
|
||||
|
||||
@@ -64,8 +64,8 @@ def test_이음_끌기_걸기_한_줄_창_가로채기() -> None:
|
||||
assert pointer.count("bindRouteEditKeys(") == 1
|
||||
keys = _read("B05_Profile_UI_RouteEdit_Keys.ts")
|
||||
assert 'window.addEventListener("keydown", onKeyDown, true)' in keys # 앞서 받음(capture)
|
||||
# 본 평면만(425) — B06 겹침 평면 위 화살표는 안 먹음
|
||||
assert 'lastPointerWithin(".b05-route__main .b05-routeedit")' in keys
|
||||
# 마지막 누름이 평면 안 — B06 겹침 평면도 같음(436)
|
||||
assert 'lastPointerWithin(".b05-routeedit")' in keys
|
||||
assert "event.preventDefault();\n event.stopPropagation();" in keys
|
||||
assert "state.apexLock[index] === true" in keys # 고정 IP 는 안 옮김
|
||||
assert "shortfallCrossed(" in keys # 하한 검사 = 끌기와 같음
|
||||
|
||||
Reference in New Issue
Block a user