fix: align governance pages with growth workflow copy
All checks were successful
CD Pipeline / deploy (push) Successful in 1m2s
All checks were successful
CD Pipeline / deploy (push) Successful in 1m2s
This commit is contained in:
@@ -731,3 +731,89 @@ def test_edge_tool_pages_keep_growth_decision_copy_concise():
|
||||
assert marker in text
|
||||
for bad in forbidden:
|
||||
assert bad not in text
|
||||
|
||||
|
||||
def test_governance_and_low_frequency_pages_avoid_engineering_status_copy():
|
||||
from pathlib import Path
|
||||
|
||||
expected = {
|
||||
"templates/components/_legacy_bridge_panel.html": ["頁面狀態", "已整併", "業績流程可用"],
|
||||
"templates/403.html": ["權限守門", "未授權操作影響營運資料", "權限控管"],
|
||||
"templates/maintenance.html": ["服務維護", "確認業績、比價與匯入狀態", "台北時間"],
|
||||
"templates/auto_import_index.html": ["更新日報、成長分析與今日作戰清單", "去重後寫入業績快照"],
|
||||
"templates/settings.html": ["比價來源同步", "補齊 MOMO 參考來源"],
|
||||
"templates/system_settings.html": ["營運資料備份", "可回復的業績與設定狀態"],
|
||||
"templates/ai_recommend.html": ["值得主推、調價或補比價", "回到 PChome 銷售動作"],
|
||||
"templates/notification_templates.html": ["商品、風險與下一步"],
|
||||
"templates/vendor_stockout_index_v2.html": ["處理缺貨", "主推商品供貨風險"],
|
||||
"templates/vendor_stockout_vendor_management_v2.html": ["正確窗口"],
|
||||
"templates/login_history.html": ["避免未授權操作影響業績流程", "裝置資訊"],
|
||||
"templates/logs.html": ["錯誤", "注意", "資訊"],
|
||||
"templates/ai_automation_smoke.html": ["AI 閉環守門", "支援業績流程"],
|
||||
"templates/external_tool_status.html": ["共用預覽"],
|
||||
"templates/market_intel/disabled.html": ["市場情報", "操作入口"],
|
||||
"templates/brand_assets.html": ["EwoooC 品牌資產庫", "品牌資產混用"],
|
||||
"templates/code_review.html": ["部署守門與程式碼審查", "業績流程上線前檢查", "部署證據"],
|
||||
}
|
||||
forbidden = [
|
||||
"MIGRATED PAGE",
|
||||
"V3 READY",
|
||||
"Growth workflow active",
|
||||
"ACCESS CONTROL",
|
||||
"403 / Forbidden",
|
||||
"SYSTEM MAINTENANCE",
|
||||
"Asia Taipei",
|
||||
"VENDOR OPERATIONS",
|
||||
"SYSTEM OPERATIONS",
|
||||
"MIGRATED DASHBOARD",
|
||||
"MIGRATED CAMPAIGN",
|
||||
"Legacy guard",
|
||||
"資料將會",
|
||||
"無需重啟系統",
|
||||
"完整備份",
|
||||
"打包所有程式碼與資料庫",
|
||||
"輸入商品名稱後點擊",
|
||||
"點擊「預覽」按鈕查看效果",
|
||||
"目前沒有匯入的缺貨資料",
|
||||
"提示:可以從 Excel",
|
||||
"系統登入記錄與異常嘗試追蹤",
|
||||
"User Agent",
|
||||
"四 Agent 控制面",
|
||||
"不會影響 DB",
|
||||
"Live Plugin",
|
||||
"MARKET INTEL",
|
||||
"OPERATIONS",
|
||||
"WOOO TECH",
|
||||
"Main Logo",
|
||||
"Glass Version",
|
||||
"Gradient Version",
|
||||
"AI 程式碼審查",
|
||||
]
|
||||
|
||||
legacy_paths = [
|
||||
"templates/dashboard.html",
|
||||
"templates/edm_dashboard.html",
|
||||
"templates/send_email.html",
|
||||
"templates/history.html",
|
||||
"templates/import.html",
|
||||
"templates/crawler_management.html",
|
||||
"web/templates/vendor_stockout/send_email.html",
|
||||
"web/templates/vendor_stockout/index.html",
|
||||
"web/templates/vendor_stockout/list.html",
|
||||
"web/templates/vendor_stockout/history.html",
|
||||
"web/templates/vendor_stockout/import.html",
|
||||
"web/templates/vendor_stockout/vendor_management.html",
|
||||
]
|
||||
|
||||
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
|
||||
|
||||
for path in legacy_paths:
|
||||
text = Path(path).read_text(encoding="utf-8")
|
||||
assert "已整併" in text
|
||||
for bad in forbidden:
|
||||
assert bad not in text
|
||||
|
||||
Reference in New Issue
Block a user