feat: 完成三角色工作台及金租对公Skills全流程演示
This commit is contained in:
@@ -146,14 +146,35 @@ class OperationsCenterTests(unittest.TestCase):
|
||||
with patch.dict(os.environ, {"XINGBANG_ASSISTANT_DEMO_ENABLED":"0"}):
|
||||
self.assertEqual(self.get("/lab/source").status_code,403)
|
||||
|
||||
def test_navigation_keeps_legacy_without_four_agent_primary(self):
|
||||
def test_navigation_is_role_aware_and_keeps_project_context(self):
|
||||
root = Path(__file__).resolve().parents[1]
|
||||
nav = (root / "src/components/xingbang/AgentNav.tsx").read_text(encoding="utf-8")
|
||||
self.assertNotIn("四 Agent 工作区",nav)
|
||||
for label in ("运行中心","检查依据","演示与验收","兼容入口"):
|
||||
for label in ("业务助手","项目工作台","业务时效","配置治理","当前身份"):
|
||||
self.assertIn(label,nav)
|
||||
for label in ("运行中心","检查依据","演示与验收","兼容入口"):
|
||||
self.assertNotIn(label,nav)
|
||||
self.assertIn("ROLE_LABEL",nav)
|
||||
self.assertNotIn("typeof window",nav)
|
||||
self.assertIn('href.includes("?")',nav)
|
||||
|
||||
def test_business_ui_keeps_simple_traceable_flows(self):
|
||||
root = Path(__file__).resolve().parents[1]
|
||||
workspace = (root / "src/app/xingbang-workbench/page.tsx").read_text(encoding="utf-8")
|
||||
assistant = (root / "src/components/xingbang/BusinessAssistant.tsx").read_text(encoding="utf-8")
|
||||
dashboard = (root / "src/app/operations-center/page.tsx").read_text(encoding="utf-8")
|
||||
for label in ("待评审项目池", "客户经理提交", "领取并开始评审", "全链路评审", "批准并生成评审报告", "怎么解决"):
|
||||
self.assertIn(label, workspace)
|
||||
self.assertIn("detailText(item.detail)", workspace)
|
||||
self.assertNotIn("<p>{item.detail}</p>", workspace)
|
||||
self.assertNotIn('"方案比较"', workspace)
|
||||
self.assertNotIn('tab === "scenario"', workspace)
|
||||
self.assertIn("mini-openclaw", assistant)
|
||||
self.assertIn("<ChatPanel/>", assistant)
|
||||
self.assertIn("IdentitySelector", assistant)
|
||||
self.assertIn("IdentitySelector", dashboard)
|
||||
self.assertIn("统计范围", dashboard)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user