60 lines
1.6 KiB
JavaScript
60 lines
1.6 KiB
JavaScript
const fs = require("fs");
|
|
|
|
const commonUtil = fs.readFileSync("utils/CommonUtil.js", "utf8");
|
|
|
|
function assert(condition, message) {
|
|
if (!condition) throw new Error(message);
|
|
}
|
|
|
|
[
|
|
"cai.html",
|
|
"caiinfo.html",
|
|
].forEach((page) => {
|
|
assert(commonUtil.includes(`'${page}'`), `cai navigation page missing: ${page}`);
|
|
});
|
|
|
|
[
|
|
"usercenter.html",
|
|
"mianfeishoucang.html",
|
|
"tuiguang.html",
|
|
"jine.html",
|
|
"chongzhi.html",
|
|
"tixian.html",
|
|
"tixianlist.html",
|
|
"fabumianfeiwenzhang.html",
|
|
"fufei.html",
|
|
"appdown.html",
|
|
"apply.html",
|
|
"open-browser.html",
|
|
"reg.html",
|
|
"repwd.html",
|
|
"social-callback.html",
|
|
"upgrade.html",
|
|
"wodefenxiao.html",
|
|
"yinsixieyi.html",
|
|
"yonghuxieyi.html",
|
|
].forEach((page) => {
|
|
assert(commonUtil.includes(`'${page}'`), `empty navigation page missing: ${page}`);
|
|
});
|
|
|
|
[
|
|
"双色球走势图",
|
|
"基本走势",
|
|
"出号分布",
|
|
"红蓝走势",
|
|
"综合走势",
|
|
"蓝球走势",
|
|
"蓝球振幅",
|
|
"蓝球尾数",
|
|
"蓝球两数和",
|
|
].forEach((label) => {
|
|
assert(commonUtil.includes(`label: '${label}'`), `feature nav item missing: ${label}`);
|
|
});
|
|
|
|
assert(commonUtil.includes("开发中敬请期待"), "coming-soon popup text missing");
|
|
assert(commonUtil.includes("trend-icons/dev-coming.png"), "coming-soon popup image missing");
|
|
assert(commonUtil.includes("this.installTopbarNavigationMode();"), "loadPageConfig should install topbar navigation mode");
|
|
assert(commonUtil.includes("DOMContentLoaded', installTopbarNavigationMode"), "DOMContentLoaded should install topbar navigation mode");
|
|
|
|
console.log("topbar navigation mode checks passed");
|