fix: make help and empty states action oriented
All checks were successful
CD Pipeline / deploy (push) Successful in 1m6s
All checks were successful
CD Pipeline / deploy (push) Successful in 1m6s
This commit is contained in:
@@ -653,3 +653,46 @@ def test_secondary_and_governance_pages_keep_growth_decision_copy_concise():
|
||||
assert marker in text
|
||||
for bad in forbidden:
|
||||
assert bad not in text
|
||||
|
||||
|
||||
def test_help_empty_login_and_ppt_copy_are_action_oriented():
|
||||
from pathlib import Path
|
||||
|
||||
expected = {
|
||||
"templates/ai_recommend.html": [
|
||||
"銷售動作",
|
||||
"把商品證據轉成可追蹤的銷售動作",
|
||||
"回到業績成長指揮台追蹤是否帶動商品處理",
|
||||
],
|
||||
"templates/ai_intelligence.html": [
|
||||
"先整理業績、比價與資料狀態,再決定下一步",
|
||||
"先檢查備援資料品質",
|
||||
],
|
||||
"templates/daily_sales.html": ["才能判斷下滑與價差壓力"],
|
||||
"templates/growth_analysis.html": ["先匯入月度業績資料,再評估成長、AOV 與毛利缺口"],
|
||||
"templates/index.html": ["缺貨處理順序", "避免主推商品斷貨"],
|
||||
"templates/login.html": ["登入後先看 PChome 業績、價差、缺貨與 AI 建議"],
|
||||
"templates/system_settings.html": ["系統會更新對應年月份的業績資料"],
|
||||
"templates/admin/ppt_audit_history.html": [
|
||||
"先補齊視覺 QA runtime,再判斷簡報品質",
|
||||
"先補排程或手動產出,再進行視覺 QA",
|
||||
"先補視覺 QA 條件",
|
||||
],
|
||||
}
|
||||
forbidden = [
|
||||
"使用說明",
|
||||
"這裡會顯示最適合的下一步",
|
||||
"再用這裡檢查",
|
||||
"這裡會顯示背景任務狀態",
|
||||
"目前查無本月 DB 產出紀錄",
|
||||
"為什麼這頁空",
|
||||
"目前不是模型能力問題",
|
||||
"大量資料可能需要較長時間",
|
||||
]
|
||||
|
||||
for path, markers in expected.items():
|
||||
text = Path(path).read_text(encoding="utf-8")
|
||||
for marker in markers:
|
||||
assert marker in text
|
||||
for bad in forbidden:
|
||||
assert bad not in text
|
||||
|
||||
Reference in New Issue
Block a user