|
|
|
@ -3,6 +3,7 @@ const fs = require("fs");
|
|
|
|
const path = require("path");
|
|
|
|
const path = require("path");
|
|
|
|
const root = path.join(__dirname, "..");
|
|
|
|
const root = path.join(__dirname, "..");
|
|
|
|
const page = fs.readFileSync(path.join(root, "src", "views", "teacherEnd", "student", "index.vue"), "utf8");
|
|
|
|
const page = fs.readFileSync(path.join(root, "src", "views", "teacherEnd", "student", "index.vue"), "utf8");
|
|
|
|
|
|
|
|
const api = fs.readFileSync(path.join(root, "src", "api", "teacher.js"), "utf8");
|
|
|
|
|
|
|
|
|
|
|
|
assert(page.includes("operatorId: currentUserId.value"), "学生列表必须携带当前教师");
|
|
|
|
assert(page.includes("operatorId: currentUserId.value"), "学生列表必须携带当前教师");
|
|
|
|
assert(page.includes("const isManagerTeacher = computed(() => userStore.userInfo.teacherAdmin === true);"), "教师管理员身份必须由当前登录账号识别");
|
|
|
|
assert(page.includes("const isManagerTeacher = computed(() => userStore.userInfo.teacherAdmin === true);"), "教师管理员身份必须由当前登录账号识别");
|
|
|
|
@ -12,8 +13,9 @@ assert(page.includes("const resolveRowTeachingClassId = (row) =>"), "未选择
|
|
|
|
assert(page.includes('class="student-action-group"'), "学生操作按钮必须使用固定操作组布局");
|
|
|
|
assert(page.includes('class="student-action-group"'), "学生操作按钮必须使用固定操作组布局");
|
|
|
|
assert(page.includes("flex-wrap: nowrap"), "学生操作按钮不得换行");
|
|
|
|
assert(page.includes("flex-wrap: nowrap"), "学生操作按钮不得换行");
|
|
|
|
assert(!page.includes("仅查看</el-tag>"), "学生列表不应再展示仅查看操作");
|
|
|
|
assert(!page.includes("仅查看</el-tag>"), "学生列表不应再展示仅查看操作");
|
|
|
|
assert(page.includes("请选择自己的教学班后再导入学生"), "导入必须要求选中教学班");
|
|
|
|
assert(page.includes('["学生姓名", "学号", "班级"]'), "教学班导入模板必须包含班级列");
|
|
|
|
assert(page.includes('["学生姓名", "学号"]'), "教学班导入模板必须只有学生姓名和学号");
|
|
|
|
assert(!page.includes("请选择自己的教学班后再导入学生"), "按班级导入不应要求页面先选中教学班");
|
|
|
|
|
|
|
|
assert(api.includes('url: "/api/user/teaching-classes/students/import"'), "按班级导入必须调用新的上传接口");
|
|
|
|
assert(page.includes("initPassword(row, 1)"), "学生列表必须提供数据初始化操作");
|
|
|
|
assert(page.includes("initPassword(row, 1)"), "学生列表必须提供数据初始化操作");
|
|
|
|
|
|
|
|
|
|
|
|
console.log("teacher owned student management static checks passed");
|
|
|
|
console.log("teacher owned student management static checks passed");
|
|
|
|
|