"""730-1 지킴 — 엑셀 격자 고른 범위 · 참조 테두리 · 채우기 손잡이는 굴리는 영역 밖으로 안 나감(요구 566). 화면 수치 판정은 tmp 의 playwright 일회 검증 · 여기서는 자르기 길이 빠지지 않았는지만 지킴.""" import re from pathlib import Path SRC = (Path(__file__).parents[2] / "A00_Common/spreadsheet/spreadsheet_grid.ts").read_text( encoding="utf-8" ) def body(name: str) -> str: m = re.search(rf"function {name}\(.*?\n }}\n", SRC, re.S) assert m, name return m.group(0) def test_clip_helper_uses_frozen_and_pane_size(): h = body("clipOf") assert "frozenH" in h and "frozenW" in h assert "paneBR.clientHeight" in h and "paneBR.clientWidth" in h def test_selection_and_ref_borders_are_clipped(): assert "clipPath = clipOf(" in body("renderSelection") assert "clipPath = clipOf(" in body("setRefHighlights") def test_fill_handle_hidden_outside_view(): assert 'handle.style.display = "none"' in body("renderSelection")