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.
dianshang-qianduan/tests/teacher-task-score-detail.s...

22 lines
973 B
JavaScript

const assert = require("node:assert/strict");
const fs = require("node:fs");
const path = require("node:path");
const root = path.resolve(__dirname, "..");
const page = fs.readFileSync(path.join(root, "src", "views", "teacherEnd", "score", "index.vue"), "utf8");
const api = fs.readFileSync(path.join(root, "src", "api", "teacher.js"), "utf8");
assert.match(page, /label="教师评分"/);
assert.match(page, /v-model="row\.teacherScoreDraft"/);
assert.match(page, /:precision="0"/);
assert.match(page, /saveTaskTeacherScore\(row\)/);
assert.match(page, /教师评分必须为0至100之间的整数/);
assert.match(page, /taskDetailPagination/);
assert.match(page, /taskDetailTotal/);
assert.match(page, /@pagination="getClassScoreDetail"/);
assert.match(page, /refreshScoreDetail/);
assert.match(api, /export function saveTaskTeacherScore/);
assert.match(api, /url: "\/api\/weight\/saveTaskTeacherScore"/);
console.log("teacher task score detail static checks passed");