You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
992 B
JavaScript
21 lines
992 B
JavaScript
|
1 month ago
|
const assert = require("assert");
|
||
|
|
const fs = require("fs");
|
||
|
|
const path = require("path");
|
||
|
|
|
||
|
|
const page = fs.readFileSync(
|
||
|
|
path.resolve(__dirname, "../src/views/teacherEnd/class/index.vue"),
|
||
|
|
"utf8"
|
||
|
|
);
|
||
|
|
|
||
|
|
assert(!/导入名单创建/.test(page));
|
||
|
|
assert(!/downloadTeachingClassImportTemplate/.test(page));
|
||
|
|
assert(!/uploadTeachingClassByStudentMembers/.test(page));
|
||
|
|
assert(!/beforeImportCreate/.test(page));
|
||
|
|
assert(/const isManagerTeacher = computed\(\(\) => userStore\.userInfo\.teacherAdmin === true\);/.test(page));
|
||
|
|
assert(/if \(isManagerTeacher\.value\) \{[\s\S]*schoolClass\.schoolId === currentSchoolId\.value;[\s\S]*\}/.test(page));
|
||
|
|
assert(/const selectedTeachingClassCanOperate = computed\(\(\) => canOperateClass\(selectedTeachingClass\.value\)\);/.test(page));
|
||
|
|
assert(/operatorId: currentUserId\.value,[\s\S]*function normalizeClassType/.test(page));
|
||
|
|
assert(/v-if="canOperateClass\(row\.schoolClass\)"/.test(page));
|
||
|
|
|
||
|
|
console.log("teacher administrator class access contract passed");
|