- 판이 지도 아래를 덮은 높이 = logic InfoLift infoLiftPx · Chrome 이 판 크기 관찰로 --b05-profile-cover 적음 - 접힘 · 창 분할 = 제자리 · 판을 끝까지 올려도 지도 안 120 px 남김 - 시험 test_408_2_status_lift 새로 · test_345_5c 자리 규칙 고쳐 씀 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ji4nuyLVHcxrXWHTdb5nRD
48 lines
1.8 KiB
Python
48 lines
1.8 KiB
Python
"""408-2 창 나눔(종단 판 열림) 때 평면 상태줄이 종단 표 밑에 깔림 — 판이 덮은 높이만큼 상태 · 범례를
|
|
위로(`logic/B05_Profile_RouteEdit_InfoLift.ts` · `_Chrome` 이 판 크기 관찰로 `--b05-profile-cover` 적음).
|
|
|
|
TS 셈은 `helper_408_2_status_lift.cjs`(Node).
|
|
|
|
./venv/Scripts/python.exe -m pytest resources/tester/test_408_2_status_lift.py -q
|
|
"""
|
|
|
|
import json
|
|
import subprocess
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
B05 = ROOT / "B05_Profile"
|
|
HELPER = Path(__file__).with_name("helper_408_2_status_lift.cjs")
|
|
|
|
|
|
@pytest.fixture(scope="module")
|
|
def got() -> dict:
|
|
run = subprocess.run( # noqa: S603 — 고정 실행 파일
|
|
["node", str(HELPER)], capture_output=True, text=True, encoding="utf-8", timeout=60
|
|
)
|
|
assert run.returncode == 0, run.stderr
|
|
return json.loads(run.stdout)
|
|
|
|
|
|
def test_올릴_높이(got) -> None:
|
|
assert got["open"] == 648 # 판 윗변 위로
|
|
assert got["collapsed"] == 1 and got["popout"] == 0 and got["below"] == 0
|
|
assert got["tall"] == 1078 - 120 # 지도 안에 120 px 남김
|
|
|
|
|
|
def test_상태_글판이_올림_값을_씀() -> None:
|
|
css = (B05 / "B05_Profile_UI_Style_RouteEdit.css").read_text(encoding="utf-8")
|
|
block = css[css.index(".b05-routeedit__info {\n bottom") :]
|
|
assert block.startswith(
|
|
".b05-routeedit__info {\n bottom: calc(var(--spacing-12) + var(--b05-profile-cover, 0px));"
|
|
)
|
|
|
|
|
|
def test_편집기가_판_크기를_관찰() -> None:
|
|
chrome = (B05 / "B05_Profile_UI_RouteEdit_Chrome.ts").read_text(encoding="utf-8")
|
|
assert "new ResizeObserver(liftInfo)" in chrome and "lift.observe(overlay)" in chrome
|
|
assert '"--b05-profile-cover"' in chrome and ".b05-route-profile" in chrome
|
|
assert "lift.disconnect" not in chrome # 붙기 전 첫 알림에 끊으면 영영 안 올라감
|