diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index 6468863..4f14bce 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -286,12 +286,6 @@ const sidebarStyle = computed(() => { }); const studentCourseNav = [ { title: "AI智能助手", path: "/assistant/index", activePrefix: "/assistant" }, - { - title: "综合实训", - children: [ - { title: "综合案例实训", path: "/comprehensive/index" }, - ], - }, { title: "互联网产品开发基础", children: [ @@ -340,6 +334,12 @@ const studentCourseNav = [ { title: "产品问题诊断与迭代", path: "/assessment/diagnosis" }, ], }, + { + title: "综合实训", + children: [ + { title: "综合案例实训", path: "/comprehensive/index" }, + ], + }, ]; const teacherManageNav = [ { diff --git a/tests/comprehensive-training-last.static.test.cjs b/tests/comprehensive-training-last.static.test.cjs new file mode 100644 index 0000000..b052e3b --- /dev/null +++ b/tests/comprehensive-training-last.static.test.cjs @@ -0,0 +1,13 @@ +const assert = require("assert"); +const fs = require("fs"); +const path = require("path"); + +const sidebar = fs.readFileSync( + path.join(__dirname, "..", "src", "layout", "components", "Sidebar", "index.vue"), + "utf8" +); +const comprehensiveIndex = sidebar.indexOf('title: "综合实训"'); +const launchIndex = sidebar.indexOf('title: "产品上线与运营推广"'); + +assert(comprehensiveIndex > launchIndex, "综合实训应显示在学生端课程导航最后"); +console.log("comprehensive-training-last static test passed");