test(frontend): UIUX E2E 测试 — 新增路由导航/创始人端/Admin端/工作台/移动端适配

新增 6 个 E2E 测试文件,覆盖 2-task-uiux.md 全部 50 项任务:
- uiux-navigation.spec.ts: 8 tests (today/compare/threads/workspace/ooda/ai-plus/profiles)
- sidebar-navigation.spec.ts: 6 tests (投资人 Sidebar 6 业务域)
- founder-uiux.spec.ts: 7 tests (创始人端 6 域导航)
- admin-uiux.spec.ts: 3 tests (Admin 6 管理域 + 商业秘密保护)
- workbench-uiux.spec.ts: 5 tests (Highlights/WorkMode/Tab/InsightRail)
- mobile-uiux.spec.ts: 5 tests (移动端抽屉导航 + 创始人底部导航)

同时修复全部 no-explicit-any 警告,替换为 TypeScript 接口定义。

测试结果: 41 E2E passed, 405 backend passed
This commit is contained in:
selfrelease
2026-07-19 20:37:25 +08:00
parent 3a905da35b
commit f4ddcab2ca
62 changed files with 1549 additions and 369 deletions
@@ -2,7 +2,7 @@
"use client";
import { MessageSquare, FileText, CheckCircle2, Clock, AlertTriangle } from "lucide-react";
import { MessageSquare, FileText, CheckCircle2, Clock} from "lucide-react";
/** 投资人沟通准备中心页面。 */
export default function InvestorCommsPage() {
+41 -7
View File
@@ -6,19 +6,53 @@ import { Card, Badge } from "@/components/shared/PageContainer";
import { LoadingSpinner } from "@/components/shared/LoadingSpinner";
import { EmptyState } from "@/components/shared/EmptyState";
/** 企业信息。 */
interface CompanyInfo {
name?: string;
industry?: string;
stage?: string;
}
/** 健康度评分。 */
interface HealthScoreInfo {
total_score?: number;
trend?: string;
}
/** 月报信息。 */
interface LatestReportInfo {
period?: string;
status?: string;
}
/** 概览数据。 */
interface FounderOverviewData {
company?: CompanyInfo;
health_score?: HealthScoreInfo;
latest_report?: LatestReportInfo;
}
/** 健康度详情。 */
interface HealthDetail {
financial_score?: number;
operational_score?: number;
ai_commercial_score?: number;
ai_cost_score?: number;
}
/**
* 创始人端经营概览 — 企业信息 + 健康度 + 最新月报。
*/
export default function FounderHomePage() {
const [overview, setOverview] = useState<Record<string, any> | null>(null);
const [health, setHealth] = useState<Record<string, any> | null>(null);
const [overview, setOverview] = useState<FounderOverviewData | null>(null);
const [health, setHealth] = useState<HealthDetail | null>(null);
const [isLoading, setIsLoading] = useState(true);
useEffect(() => {
Promise.all([founderOverview(), founderHealth()])
.then(([ov, h]) => {
setOverview(ov.data as Record<string, any>);
setHealth(h.data as Record<string, any>);
setOverview(ov.data as FounderOverviewData);
setHealth(h.data as HealthDetail);
})
.catch(() => {
setOverview(null);
@@ -29,9 +63,9 @@ export default function FounderHomePage() {
if (isLoading) return <LoadingSpinner />;
const company = overview?.company as Record<string, any> | undefined;
const healthScore = overview?.health_score as Record<string, any> | undefined;
const latestReport = overview?.latest_report as Record<string, any> | undefined;
const company = overview?.company;
const healthScore = overview?.health_score;
const latestReport = overview?.latest_report;
return (
<div className="space-y-6">