Files
Aislo/resources/tester/test_230_1_popout_wheel.py
T
eomsangdonandClaude Opus 5.5 dd483a8fbd fix(B05): 종단 새 창 최대화 때 휠 이동 — 스크롤러가 놓인 창의 화면 틀 · 시계 사용(230-1)
메인 창 requestAnimationFrame 은 새 창 최대화로 메인 창이 가려지면 멈춤 · 휠은 막히고 이동 0.
휠 이동 · 끌기 뒤 클릭 삼킴 · 글자 선택 풀기 · 스크롤 뒤 다시 그리기 시계를 ownerDocument.defaultView 로.
새 시험 test_230_1_popout_wheel(가려진 메인 창 · 새 창 보통 · 최대화 · 원래 창).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01F3mdb91125mPoC6tpsQx4P
2026-10-10 17:42:52 +09:00

63 lines
2.0 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# -*- coding: utf-8 -*-
"""종단 새 창 + 최대화 휠(계획서 230-1) 회귀검증.
까닭 — 휠 이동 · 스크롤 뒤 다시 그리기가 메인 창 전역 화면 틀 · 시계를 썼음. 새 창을 최대화하면
메인 창이 가려져 브라우저가 그 틀을 멈춤 → 휠은 막히고(preventDefault) 이동은 0.
고침 — 스크롤러가 놓인 창(`ownerDocument.defaultView`)의 틀 · 시계를 씀.
`helper_230_1_popout_wheel.cjs` 가 메인 창을 「가려짐」(틀 · 시계 멈춤)으로 두고 판정함.
"""
import json
import os
import subprocess
import pytest
HERE = os.path.dirname(os.path.abspath(__file__))
@pytest.fixture(scope="module")
def r():
proc = subprocess.run(
["node", os.path.join(HERE, "helper_230_1_popout_wheel.cjs")],
capture_output=True,
text=True,
encoding="utf-8",
timeout=60,
)
assert proc.returncode == 0, proc.stderr
return json.loads(proc.stdout)
def test_새_창_보통_휠_이동_메인_틀_안_씀(r):
p = r["popupNormal"]
assert p["left"] == 360 # 세 칸 × 120
assert p["prevented"] == [True, True, True]
assert p["popupFrames"] > 0 and p["mainTimers"] == 0
def test_새_창_최대화_뒤_휠_이동(r):
p = r["popupMax"]
assert p["limit"] == 4080 # 6000 − 1920 — 최대화해도 스크롤할 거리 남음
assert p["lightSyncs"] == 1 # 크기 바뀜 듣개가 돎
assert p["left"] == 240 # 두 칸 × 120
assert p["draws"] == 1 # 스크롤 뒤 다시 그리기도 새 창 시계로
assert p["mainTimersAdded"] == 0
def test_끝에서_멈추고_기본_스크롤로_넘김(r):
p = r["popupEnd"]
assert p["left"] == 280 # 한도 2200 − 1920
assert p["prevented"][-1] is False and p["after"] is False
def test_원래_창_휠_그대로(r):
assert r["mainWindow"] == {"left": 360, "prevented": [True, True, True]}
def test_끌기_글자_선택은_새_창에서_풂(r):
d = r["drag"]
assert d["left"] == 100
assert d["popupCleared"] is True and d["mainCleared"] is False