修改页面样式功能,首页样式功能导航栏样式功能等
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
const fs = require("fs");
|
||||
|
||||
const commonUtil = fs.readFileSync("utils/CommonUtil.js", "utf8");
|
||||
|
||||
function assert(condition, message) {
|
||||
if (!condition) {
|
||||
throw new Error(message);
|
||||
}
|
||||
}
|
||||
|
||||
assert(
|
||||
/installCaiSingleLotteryMode\(\)\s*\{[\s\S]*#lotteryFilter[\s\S]*closest\('\.cxz-filter-row'\)\.hide\(\);/.test(
|
||||
commonUtil,
|
||||
),
|
||||
"CommonUtil should hide the inner lottery filter row on cai.html",
|
||||
);
|
||||
|
||||
assert(
|
||||
/installCaiSingleLotteryMode\(\)\s*\{[\s\S]*ApiClient\.loadMenuCompat\(\)[\s\S]*topbar__nav-link/.test(
|
||||
commonUtil,
|
||||
),
|
||||
"CommonUtil should render lottery switching into the top navigation",
|
||||
);
|
||||
|
||||
assert(
|
||||
/activeClass\s*=\s*String\(code\)\s*===\s*currentCode[\s\S]*topbar__nav-link'\s*\+\s*activeClass/.test(
|
||||
commonUtil,
|
||||
),
|
||||
"CommonUtil top navigation should mark current lottery active",
|
||||
);
|
||||
|
||||
assert(
|
||||
/this\.installCaiSingleLotteryMode\(\);/.test(commonUtil),
|
||||
"CommonUtil.loadPageConfig should install cai single-lottery mode",
|
||||
);
|
||||
|
||||
console.log("cai single-lottery checks passed");
|
||||
Reference in New Issue
Block a user