You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
1.0 KiB
Python
16 lines
1.0 KiB
Python
def test_dashboard(client):
|
|
d = client.get("/api/dashboard").json()
|
|
assert d["user"]["name"] == "지우" and d["user"]["initial"] == "지"
|
|
assert d["briefing"]["today"] == "6월 7일 일요일" # 히어로 날짜 라벨
|
|
assert d["briefing"]["weather"]["temp"] == 24
|
|
assert d["briefing"]["weather"]["icon"] == "sun" # cloudSun 저장 → sun 표시
|
|
assert d["saved_today"] == "47분" and d["today_routed"] == 7
|
|
assert isinstance(d["schedule"], list) # phase-16+: 일정 시드 제거 → 빈 일정(연결 전)
|
|
assert d["badges"]["appr"] == 3 # high risk 3건
|
|
assert d["badges"]["noti"] == 6
|
|
assert d["task_summary"]["open_count"] == 0 # 작업 시드 제거 → 빈 상태
|
|
assert len(d["approvals_summary"]) <= 3 # high-risk 만, 최대 3건
|
|
assert d["goals"][0]["tone"] == "blue" # tone 키('var(--blue)' 아님)
|
|
# inbox_recent 는 평탄화 형태 {id,kind,raw,type,proj_label,tone}
|
|
assert set(d["inbox_recent"][0]) == {"id", "kind", "raw", "type", "proj_label", "tone"}
|