feat: deliver schema 15 monthly settlement lifecycle
This commit is contained in:
@@ -43,6 +43,18 @@ def test_sidebar_selection_updates_only_page_query_parameter(monkeypatch):
|
||||
assert query == {"page": "거래내역", "month": "2026-06", "account_id": "checking"}
|
||||
|
||||
|
||||
def test_sidebar_monthly_settlement_serializes_canonical_page(monkeypatch):
|
||||
query = {"page": "요약", "month": "2026-06"}
|
||||
state = {"dashboard_page": "월정산"}
|
||||
callback = {}
|
||||
monkeypatch.setattr(common.st, "query_params", query)
|
||||
monkeypatch.setattr(common.st, "session_state", state)
|
||||
monkeypatch.setattr(common.st, "radio", lambda *args, **kwargs: callback.setdefault("fn", kwargs["on_change"]) or state["dashboard_page"])
|
||||
common.render_sidebar_nav(PAGES, "월정산")
|
||||
callback["fn"]()
|
||||
assert query == {"page": "monthly_settlement", "month": "2026-06"}
|
||||
|
||||
|
||||
def test_missing_or_unknown_page_falls_back_to_overview():
|
||||
assert common.validate_dashboard_page(None, PAGES) == "요약"
|
||||
assert common.validate_dashboard_page("not-a-page", PAGES) == "요약"
|
||||
|
||||
Reference in New Issue
Block a user