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/generic-training-standard.s...

14 lines
834 B
JavaScript

const assert = require("assert");
const fs = require("fs");
const path = require("path");
const root = path.resolve(__dirname, "..");
const source = fs.readFileSync(path.join(root, "src/views/training/GenericTrainingPage.vue"), "utf8");
const shell = source.match(/\.student-training-page \{([\s\S]*?)\n\}/)?.[1] || "";
assert.match(shell, /padding:\s*24px 24px 32px;/, "generic training pages must use the standard shell padding");
assert.match(shell, /background:\s*#06111d;/, "generic training pages must keep the standard continuous deep-blue canvas");
assert.match(source, /@media \(max-width: 1100px\) \{\s*\.student-training-page \{\s*grid-template-columns:\s*1fr;/, "generic training pages must stack the AI column at the standard 1100px breakpoint");
console.log("Generic training page uses the standard shell spacing.");