- [저장]도 [확정]처럼 횡단 보기를 숨긴 채라도 세움 → 횡단 본문 = 횡단 보기 몫 한 벌 - 종단 보기 몫 cross(saveCachedCrossPatches) 지움 · 횡단 보기를 못 세우면 반쪽 저장 대신 실패 알림 - 시험 test_384_6 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TteK8mfYZetk5P3bEZkyVZ
47 lines
1.7 KiB
Python
47 lines
1.7 KiB
Python
"""PLAN 386-6 sub7 — [저장] 본문 보기 무관(B05 만 연 길 지움).
|
|
|
|
못박는 것
|
|
- [저장] · [확정] 둘 다 횡단 보기를 (숨긴 채라도) 세움 → 횡단 본문 = 횡단 보기 몫 한 벌(`crossSaveParts`).
|
|
- 종단 보기 몫엔 횡단 본문이 없음 — 옛 「횡단 보기를 세운 적 없이 [저장]」 캐시 패치 길(saveCachedCrossPatches) 지움.
|
|
- 횡단 보기를 못 세우면 반쪽 저장 대신 실패 알림.
|
|
화면(B05 만 연 [저장] 본문 = B06 다녀온 본문)은 PLAN 386-6 검증 줄.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[2]
|
|
|
|
|
|
def _read(rel: str) -> str:
|
|
return (ROOT / rel).read_text(encoding="utf-8")
|
|
|
|
|
|
def _save_body() -> str:
|
|
shared = _read("A00_Common/design/design_shared.ts")
|
|
start = shared.index("export async function saveSharedDesign")
|
|
return shared[start : shared.index("\n}\n", start)]
|
|
|
|
|
|
def test_저장도_횡단_보기를_세움():
|
|
body = _save_body()
|
|
assert 'await shared.ensureView("cross");' in body
|
|
assert 'if (confirm) await shared.ensureView("cross")' not in body
|
|
assert "cross: crossBody," in body
|
|
assert "profileSave?.cross" not in body
|
|
|
|
|
|
def test_못_세우면_실패_알림():
|
|
body = _save_body()
|
|
assert "if (!crossBody) {" in body
|
|
assert '"B06_Profile_Save_Failed"' in body and '"B06_Profile_Confirm_Failed"' in body
|
|
|
|
|
|
def test_종단_보기_몫엔_횡단_본문_없음():
|
|
actions = _read("B05_Profile/B05_Profile_UI_Page_Actions.ts")
|
|
start = actions.index("export function profileSaveParts(")
|
|
parts = actions[start:]
|
|
assert "saveCachedCrossPatches" not in actions
|
|
assert "\n cross: " not in parts
|