assert(/path: "\/school"[\s\S]*?requiresFacultyManagement:\s*true/.test(teacherRoutes),"teacher faculty menu must be gated by the faculty switch");
assert(/path: "\/major"[\s\S]*?requiresMajorManagement:\s*true/.test(teacherRoutes),"teacher major menu must be gated by the major switch");
assert(!/requiresAdminClass/.test(teacherManagementRoute),"teacher management must remain available when administrative-class management is disabled");
assert(/requiresFacultyManagement:\s*true/.test(sidebar),"the teacher course-style faculty item must declare its capability");
assert(/requiresMajorManagement:\s*true/.test(sidebar),"the teacher course-style major item must declare its capability");
assert(/filterTeacherManageNavigation\(teacherManageNav\)/.test(sidebar),"the teacher course-style sidebar must filter its hard-coded navigation before rendering");
assert(/currentCourseNav = computed\([\s\S]*?filterTeacherManageNavigation\(teacherManageNav\)/.test(sidebar),"teachers must render the filtered course-style navigation instead of the raw hard-coded menu");
assert(/watch\(\s*\(\) => userStore\.schoolProductConfig\?\.organizationMode/.test(sidebar),"sidebar must refresh when the asynchronous school configuration arrives");
assert(/organizationMode/.test(platformSchool)&&/updatePlatformSchoolProductConfig/.test(platformSchool),"platform school editor must manage organization mode");
assert(/行政班管理/.test(platformSchool),"platform school editor must expose administrative-class management controls");
assert(/v-model="productConfig\.facultyManagementEnabled"/.test(platformSchool),"platform school editor must configure faculty management with a switch");
assert(/v-model="productConfig\.majorManagementEnabled"/.test(platformSchool),"platform school editor must configure major management with a switch");
assert(/v-model="productConfig\.adminClassManagementEnabled"/.test(platformSchool),"platform school editor must configure administrative classes with a switch");
assert(/requiresFacultyManagement/.test(router)&&/requiresMajorManagement/.test(router),"teacher routes must declare their management capability");
assert(/adminClassManagementEnabled/.test(teacherClass),"teacher class page must derive administrative-class controls from the switch");
assert(/isTeacherRosterMode/.test(teacherClass),"teacher class page must recognize teacher-managed roster mode");
assert(!/!this\.userInfo\?\.schoolId\s*\|\|\s*this\.userInfo\?\.roleId\s*==\s*1/.test(userStore),"school configuration loading must not be skipped because cached user info lacks schoolId");
assert(/this\.userInfo\?\.roleId\s*==\s*1/.test(userStore)&&/return getCurrentSchoolProductConfig\(\)/.test(userStore),"every non-platform user must load school configuration from the backend token");
assert(/await userStore\.ensureSchoolProductConfig\(\)/.test(sidebar),"school menus must load the product configuration before they are generated");
assert(/const facultyEnabled = config\?\.facultyManagementEnabled === true;/.test(sidebar),"faculty menus must fail closed until their school capability is confirmed");
assert(/const majorEnabled = config\?\.majorManagementEnabled === true;/.test(sidebar),"major menus must fail closed until their school capability is confirmed");
assert(/visibleSidebarRouters/.test(sidebar),"sidebar rendering must apply school capability filtering as a final guard");
assert(/v-for="\(route, index\) in visibleSidebarRouters"/.test(sidebar),"the sidebar must render the final filtered routes instead of the raw route list");
assert(/:key="sidebarMenuKey"/.test(sidebar),"the Element Plus menu must remount when visible school routes change");
assert(/const sidebarMenuKey = computed\(\(\) => visibleSidebarRouters\.value\.map\(\(route\) => route\.path\)\.join\("\|"\)\);/.test(sidebar),"menu remount key must derive from the visible routes");