- (B) 종단도 기준(기울기 상한 · 최소고 강제 · 시작 측점) = 세션 초안 ?? 저장 노선 설정 — 두 보기가 그린 뒤 applyPageSettings 하나 · B06 이 받은 노선은 캐시에 - (C) 상세 강제 다시 받기 = 듣는 쪽 한 번(숨은 종단 보기 옛 객체 안 쥠) · [측점 만들기] 뒤 캐시 비우고 강제로 받음 - (D) [저장] 상단측 차례 = flushRouteParts 한 벌(노선 캐시 지표 조건 + 확정 지표면 id · 비정규 빈 목록) — 종단 보기를 열든 안 열든 같은 요청 - 시험 test_271_detail_notify · test_271_save_same · test_271_profile_settings · 옛 저장 시험 가짜 창구에 flushRouteParts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
56 lines
1.7 KiB
Python
56 lines
1.7 KiB
Python
"""463 B05 · B06 한 페이지 — 상세 갈아끼움 알림(요구 271-5 · 분석 4장 (C)).
|
|
|
|
① R1 — 강제 다시 받기(넓힘 재생성) = 듣는 쪽(B05 종단 보기) 한 번 · 새 상세
|
|
· 옛 코드 = 0 번(B05 옛 객체 쥠)
|
|
② R2 — [측점 만들기] 뒤 = 캐시 비우고 강제로 받음 · 듣는 쪽 한 번 · 다시 그림이 새 측점
|
|
· 옛 코드 = 옛 캐시
|
|
TS 셈은 `helper_271_detail_notify.cjs`.
|
|
|
|
./venv/Scripts/python.exe -m pytest resources/tester/test_271_detail_notify.py -q
|
|
"""
|
|
|
|
import json
|
|
import subprocess
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
HELPER = Path(__file__).with_name("helper_271_detail_notify.cjs")
|
|
|
|
pytestmark = pytest.mark.skipif(
|
|
not (ROOT / "config" / "node_modules" / "typescript").is_dir(),
|
|
reason="프론트엔드 의존성 미설치",
|
|
)
|
|
|
|
|
|
@pytest.fixture(scope="module")
|
|
def got() -> dict:
|
|
run = subprocess.run( # noqa: S603 — 고정 실행 파일
|
|
["node", str(HELPER)],
|
|
capture_output=True,
|
|
text=True,
|
|
encoding="utf-8",
|
|
timeout=120,
|
|
)
|
|
assert run.returncode == 0, run.stderr
|
|
return json.loads(run.stdout)
|
|
|
|
|
|
def test_R1_강제_다시_받기는_듣는_쪽_한_번(got):
|
|
assert got["r1"] == {
|
|
"newObject": True,
|
|
"listenerCalls": 1,
|
|
"listenerGotFresh": True,
|
|
"cacheIsFresh": True,
|
|
}
|
|
|
|
|
|
def test_R2_측점_만들기_뒤_새_상세(got):
|
|
r2 = got["r2"]
|
|
assert r2["posted"] == 1
|
|
assert r2["fetchesAfter"] == 1 # 강제로 한 번 · 다시 그림은 그 캐시
|
|
assert r2["listenerCalls"] == 1
|
|
assert r2["listenerStations"] == [0, 20, 33.5, 40]
|
|
assert r2["redrawn"] == [[0, 20, 33.5, 40]]
|