增加风控列表总数并优化站内提醒
This commit is contained in:
@@ -196,6 +196,9 @@ def test_risk_workspace_has_context_sessions_system_tips_and_expandable_evidence
|
||||
assert "data-clear-chat-context" in html
|
||||
assert "data-alert-prompts" in html
|
||||
assert "data-system-tips" in html
|
||||
assert "data-system-tip-count" in html
|
||||
assert "data-open-notification-records" in html
|
||||
assert "站内提醒" in html
|
||||
assert "data-policy-tips" in html
|
||||
assert "data-report-preview" in html
|
||||
assert "chatContextKey" in source
|
||||
@@ -203,6 +206,9 @@ def test_risk_workspace_has_context_sessions_system_tips_and_expandable_evidence
|
||||
assert "session_id: crypto.randomUUID()" not in source
|
||||
assert "bindExpandableRows" in source
|
||||
assert "bindAlertContext" in source
|
||||
assert "isStationNotification" in source
|
||||
assert "fetchStationNotifications" in source
|
||||
assert "refreshSystemTipCount" in source
|
||||
assert "actionDialog.close();" in source
|
||||
assert "alertDialog.close();" in source
|
||||
assert "reportDialog.close();" in source
|
||||
@@ -246,6 +252,26 @@ def test_risk_alert_action_is_first_column() -> None:
|
||||
assert "actionFirst: true" in source
|
||||
|
||||
|
||||
def test_risk_tables_show_page_and_total_summary() -> None:
|
||||
html = (PORTAL / "employee-risk" / "dashboard" / "index.html").read_text(encoding="utf-8")
|
||||
source = (PORTAL / "employee-risk" / "dashboard" / "dashboard.js").read_text(encoding="utf-8")
|
||||
for summary_id in ("alert", "evidence", "notification"):
|
||||
assert f"data-{summary_id}-summary" in html
|
||||
assert "page_size" in source
|
||||
assert "totalPages" in source
|
||||
assert "共 ${total} 条" in source
|
||||
|
||||
|
||||
def test_risk_alert_prompts_hide_until_alert_context_is_bound() -> None:
|
||||
html = (PORTAL / "employee-risk" / "dashboard" / "index.html").read_text(encoding="utf-8")
|
||||
css = (PORTAL / "employee-risk" / "dashboard" / "dashboard.css").read_text(encoding="utf-8")
|
||||
source = (PORTAL / "employee-risk" / "dashboard" / "dashboard.js").read_text(encoding="utf-8")
|
||||
assert 'data-alert-prompts hidden' in html
|
||||
assert ".risk-prompts[hidden]" in css
|
||||
assert "display: none !important" in css
|
||||
assert "document.querySelector('[data-alert-prompts]').hidden = !alertNo" in source
|
||||
|
||||
|
||||
def test_admin_workspace_is_not_an_identity_placeholder() -> None:
|
||||
html = (PORTAL / "employee-console" / "workspace" / "index.html").read_text(encoding="utf-8")
|
||||
assert "只展示服务端确认的身份边界" not in html
|
||||
|
||||
Reference in New Issue
Block a user