const assert = require("assert"); const fs = require("fs"); const path = require("path"); const stylePath = path.join(__dirname, "..", "src", "assets", "styles", "element-ui.scss"); const source = fs.readFileSync(stylePath, "utf8"); assert( /(^|\n)\.el-loading-mask\s*\{[\s\S]*background:\s*rgba\(4, 18, 29, 0\.78\)\s*!important;/m.test(source), "全局加载遮罩必须使用深色半透明背景,不能回退为 Element Plus 默认白色" ); assert( /(^|\n)\.el-loading-spinner\s+\.path\s*\{[\s\S]*stroke:\s*#20d6ff;/m.test(source), "全局加载动画必须使用深色主题的青色" ); assert( /(^|\n)\.el-loading-text\s*\{[\s\S]*color:\s*#d7f8ff;/m.test(source), "全局加载文案必须在深色遮罩中清晰可见" ); console.log("global loading mask static checks passed");