diff --git a/frontend/src/app/test/batch/page.tsx b/frontend/src/app/test/batch/page.tsx
new file mode 100644
index 0000000..e91cb73
--- /dev/null
+++ b/frontend/src/app/test/batch/page.tsx
@@ -0,0 +1,5 @@
+import { BatchTestPage } from "@/components/pages/BatchTestPage";
+
+export default function Page() {
+ return ;
+}
diff --git a/frontend/src/app/test/cases/page.tsx b/frontend/src/app/test/cases/page.tsx
new file mode 100644
index 0000000..a367117
--- /dev/null
+++ b/frontend/src/app/test/cases/page.tsx
@@ -0,0 +1,5 @@
+import { TestCasesPage } from "@/components/pages/TestCasesPage";
+
+export default function Page() {
+ return ;
+}
diff --git a/frontend/src/app/test/page.tsx b/frontend/src/app/test/page.tsx
index ca1b753..4b83549 100644
--- a/frontend/src/app/test/page.tsx
+++ b/frontend/src/app/test/page.tsx
@@ -1,5 +1,5 @@
-import { TestPage } from "@/components/pages/TestPage";
+import { redirect } from "next/navigation";
export default function Page() {
- return ;
+ redirect("/test/cases");
}
diff --git a/frontend/src/components/layout/Sidebar.tsx b/frontend/src/components/layout/Sidebar.tsx
index 9f86ef8..7d41ae3 100644
--- a/frontend/src/components/layout/Sidebar.tsx
+++ b/frontend/src/components/layout/Sidebar.tsx
@@ -9,9 +9,11 @@ import {
Brain,
ChevronLeft,
ChevronUp,
+ ClipboardList,
Clock3,
Database,
HelpCircle,
+ Layers,
Wrench,
Home,
LogOut,
@@ -51,6 +53,11 @@ const monitorSubItems: NavItem[] = [
{ href: "/dashboard", label: "数据看板", icon: Database },
];
+const testSubItems: NavItem[] = [
+ { href: "/test/cases", label: "测试用例", icon: ClipboardList },
+ { href: "/test/batch", label: "批量测试", icon: Layers },
+];
+
export function Sidebar({ collapsed, onToggle }: SidebarProps) {
const pathname = usePathname();
const router = useRouter();
@@ -62,6 +69,7 @@ export function Sidebar({ collapsed, onToggle }: SidebarProps) {
const componentActive = componentSubItems.some((item) => isActive(item.href));
const monitorActive = monitorSubItems.some((item) => isActive(item.href));
+ const testActive = testSubItems.some((item) => isActive(item.href));
async function handleLogout() {
await logout();
@@ -201,13 +209,43 @@ export function Sidebar({ collapsed, onToggle }: SidebarProps) {
-
+ {collapsed ? (
+
+
+
+ ) : (
+
+ )}
+
+
+ {testSubItems.map((item) => (
+
+ ))}
+
diff --git a/frontend/src/components/pages/BatchTestPage.tsx b/frontend/src/components/pages/BatchTestPage.tsx
new file mode 100644
index 0000000..2e6c609
--- /dev/null
+++ b/frontend/src/components/pages/BatchTestPage.tsx
@@ -0,0 +1,10 @@
+import { PlaceholderPage } from "./PlaceholderPage";
+
+export function BatchTestPage() {
+ return (
+
+ );
+}
diff --git a/frontend/src/components/pages/TestCasesPage.tsx b/frontend/src/components/pages/TestCasesPage.tsx
new file mode 100644
index 0000000..ba9f6cc
--- /dev/null
+++ b/frontend/src/components/pages/TestCasesPage.tsx
@@ -0,0 +1,10 @@
+import { PlaceholderPage } from "./PlaceholderPage";
+
+export function TestCasesPage() {
+ return (
+
+ );
+}
diff --git a/frontend/src/components/pages/TestPage.tsx b/frontend/src/components/pages/TestPage.tsx
deleted file mode 100644
index 47b92f8..0000000
--- a/frontend/src/components/pages/TestPage.tsx
+++ /dev/null
@@ -1,10 +0,0 @@
-import { PlaceholderPage } from "./PlaceholderPage";
-
-export function TestPage() {
- return (
-
- );
-}