test(device): 데스크탑 배치 서명 잡음 빼기 — 화면 안 · 움직이는(애니메이션 · 로딩 원) 요소 제외 · 불러오는 중 표시가 사라질 때까지 기다림 (기기대응 1-2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ji4nuyLVHcxrXWHTdb5nRD
This commit is contained in:
2026-10-13 13:17:32 +09:00
co-authored by Claude Opus 5.5
parent 9423bd4202
commit f5c4887056
+6 -1
View File
@@ -121,13 +121,18 @@ AUDIT_JS = r"""
}
"""
# 데스크탑 배치 서명 — 보이는 요소 사각형(정수) · 순서대로
# 데스크탑 배치 서명 — 화면 안에 보이는 요소 사각형(정수) · 순서대로.
# 잡음 빼기 = 움직이는 중(CSS 애니메이션 · 로딩 원)인 요소와 그 안 · 화면 밖(스크롤 아래 1px 흔들림)
LAYOUT_JS = r"""
() => {
const rows = [];
const moving = new Set(document.getAnimations().map((a) => a.effect && a.effect.target).filter(Boolean));
const isMoving = (el) => { for (let p = el; p; p = p.parentElement) if (moving.has(p)) return true; return false; };
for (const el of document.body.querySelectorAll('*')) {
const r = el.getBoundingClientRect();
if (r.width < 1 || r.height < 1) continue;
if (r.bottom <= 0 || r.top >= innerHeight || r.right <= 0 || r.left >= innerWidth) continue;
if (isMoving(el)) continue;
if (el.checkVisibility && !el.checkVisibility({ visibilityProperty: true })) continue;
rows.push(`${el.tagName}|${Math.round(r.left)},${Math.round(r.top)},${Math.round(r.width)},${Math.round(r.height)}`);
}