feat(portal): complete advisor workspace operations
This commit is contained in:
@@ -75,6 +75,21 @@ def test_api_client_registers_all_trading_endpoint_ids() -> None:
|
||||
assert f"{endpoint_id}:" in source
|
||||
|
||||
|
||||
def test_product_detail_preserves_customer_session_for_trade_entry() -> None:
|
||||
html = (PORTAL / "guest" / "product-detail" / "index.html").read_text(encoding="utf-8")
|
||||
source = (PORTAL / "guest" / "product-detail" / "product-detail.js").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
dashboard = (PORTAL / "customer" / "dashboard" / "dashboard.js").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
assert 'data-trade-action' in html
|
||||
assert "getAuthContext" in source
|
||||
assert "textContent = '进入交易'" in source
|
||||
assert "action=trade" in source
|
||||
assert "productInput.value = productCode" in dashboard
|
||||
|
||||
|
||||
def test_api_client_registers_onboarding_risk_and_admin_endpoints() -> None:
|
||||
source = (PORTAL / "common" / "api-client.js").read_text(encoding="utf-8")
|
||||
for endpoint_id in (
|
||||
@@ -86,6 +101,20 @@ def test_api_client_registers_onboarding_risk_and_admin_endpoints() -> None:
|
||||
assert f"{endpoint_id}:" in source
|
||||
|
||||
|
||||
def test_advisor_workspace_registers_documented_operation_endpoints() -> None:
|
||||
source = (PORTAL / "common" / "api-client.js").read_text(encoding="utf-8")
|
||||
dashboard = (PORTAL / "employee-advisor" / "dashboard" / "index.html").read_text(
|
||||
encoding="utf-8"
|
||||
)
|
||||
for endpoint_id in (
|
||||
"ADVISOR_PUBLISHED", "ADVISOR_GOAL", "ADVISOR_ANALYSIS",
|
||||
"ADVISOR_ALLOCATION", "ADVISOR_RECOMMEND", "ADVISOR_CREATE_GOAL",
|
||||
):
|
||||
assert f"{endpoint_id}:" in source
|
||||
for label in ("组合分析", "资产配置", "生成推荐草案", "录入客户目标"):
|
||||
assert label in dashboard
|
||||
|
||||
|
||||
def test_risk_scan_endpoint_uses_extended_timeout() -> None:
|
||||
source = (PORTAL / "common" / "api-client.js").read_text(encoding="utf-8")
|
||||
assert (
|
||||
|
||||
Reference in New Issue
Block a user