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/student-home-score-layout.s...

18 lines
766 B
JavaScript

const fs = require("node:fs");
const path = require("node:path");
const test = require("node:test");
const assert = require("node:assert/strict");
const source = fs.readFileSync(path.resolve(__dirname, "../src/views/student/index.vue"), "utf8");
test("首页成绩环图不再同时展示会与图例重叠的外部标签", () => {
assert.match(source, /label:\s*\{\s*show:\s*false\s*\}/);
assert.match(source, /legend:\s*\{\s*orient:\s*"vertical"/);
});
test("首页成绩表的数值保持单行,并在窄空间内横向滚动", () => {
assert.match(source, /\.score-table-wrap[^}]*overflow-x:\s*auto/);
assert.match(source, /\.score-table[^}]*min-width:/);
assert.match(source, /\.score-table\s*:deep\([^)]*\)\s*\{[^}]*white-space:\s*nowrap/);
});