fix: replace internal runtime terms in visible UI
Some checks failed
CD Pipeline / deploy (push) Failing after 1m4s
Some checks failed
CD Pipeline / deploy (push) Failing after 1m4s
This commit is contained in:
@@ -821,3 +821,43 @@ def test_governance_and_low_frequency_pages_avoid_engineering_status_copy():
|
||||
assert "已整併" in text
|
||||
for bad in forbidden:
|
||||
assert bad not in text
|
||||
|
||||
|
||||
def test_visible_operations_pages_hide_internal_runtime_terms():
|
||||
from pathlib import Path
|
||||
|
||||
expected = {
|
||||
"templates/ai_recommend.html": ["分析模型", "用量"],
|
||||
"templates/vendor_stockout_index_v2.html": ["先匯入缺貨批次", "供貨風險"],
|
||||
"templates/dashboard_v2.html": ["尚無挑品建議", "先累積 PChome 比價與挑品資料"],
|
||||
"templates/daily_sales.html": ["左右滑動看業績趨勢", "左右滑動看分類明細"],
|
||||
"templates/sales_analysis.html": ["分析下一步", "選類別看貢獻", "適合檔期與活動回顧"],
|
||||
"templates/vendor_stockout_vendor_management_v2.html": ["匯入供應商窗口名單", "確認窗口清單"],
|
||||
"templates/vendor_stockout_import_v2.html": ["系統會拒絕匯入", "處理缺貨清單"],
|
||||
"templates/admin/ppt_audit_history.html": ["產出紀錄", "最近產出", "保存紀錄"],
|
||||
"templates/admin/agent_orchestration.html": ["AI 分工指揮台", "模型、工具與知識命中矩陣", "工具服務明細"],
|
||||
"templates/admin/ai_calls_dashboard.html": ["用量", "AI 上下文", "知識與工具編排矩陣"],
|
||||
"templates/admin/observability_overview.html": ["用量", "知識與工具矩陣"],
|
||||
"templates/cicd_dashboard.html": ["部署流程", "部署歷史", "修復部署", "查看部署紀錄"],
|
||||
}
|
||||
forbidden_by_path = {
|
||||
"templates/ai_recommend.html": ["權杖:", "AI 模型"],
|
||||
"templates/vendor_stockout_index_v2.html": ["資料庫目前沒有缺貨資料"],
|
||||
"templates/dashboard_v2.html": ["尚無 AI 挑品", "挑品 Agent"],
|
||||
"templates/daily_sales.html": ["左右滑動查看完整圖表", "左右滑動查看完整列表"],
|
||||
"templates/sales_analysis.html": ["提示:</strong>選擇條件", "點擊類別查看詳情", "點擊篩選此廠商商品"],
|
||||
"templates/vendor_stockout_vendor_management_v2.html": ["拖曳檔案到此處或點擊選擇檔案", "查看廠商清單"],
|
||||
"templates/vendor_stockout_import_v2.html": ["API 會拒絕匯入", "查看缺貨清單"],
|
||||
"templates/admin/ppt_audit_history.html": ["DB 紀錄", "DB / 預覽", "寫入 DB", "DB 產出紀錄", "資料庫快取", "本月尚無 DB"],
|
||||
"templates/admin/agent_orchestration.html": ["Agent 指揮矩陣", "四 Agent 矩陣", "LLM × MCP × RAG 編排矩陣", "權杖"],
|
||||
"templates/admin/ai_calls_dashboard.html": ["權杖量", "權杖/次", ">權杖<", "Agent 上下文", "RAG × MCP"],
|
||||
"templates/admin/observability_overview.html": ["權杖量", "RAG × MCP"],
|
||||
"templates/cicd_dashboard.html": ["Pipeline Flow", "Pipeline History", "完整修復", "一鍵修復", "重啟 Registry", "舊叢集"],
|
||||
}
|
||||
|
||||
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_by_path.get(path, []):
|
||||
assert bad not in text
|
||||
|
||||
Reference in New Issue
Block a user