进行了一些小修复

This commit is contained in:
2026-08-26 22:50:35 +08:00
parent b77926388f
commit af3539914d
9 changed files with 956 additions and 135 deletions
@@ -79,3 +79,31 @@ test('the purchase card owns one direct stylesheet and no retired paywall path',
assert.doesNotMatch(pay + download, /安全检测|支持 VIP 权益|支持积分结算/);
assert.doesNotMatch(download, /function_exists\('aksrt_get_pay_service_html'\)/);
});
test('the article cashier uses the reference modal contract and one direct asset path', () => {
const cashier = read('assets/js/cms-download.js');
const css = read('assets/css/frontend/cms-download.css');
const assets = read('src/Core/ScriptsPart1b.php');
assert.match(cashier, /modal-colorful-header colorful-bg jb-blue/);
assert.match(cashier, /modal-pay-body box-body/);
assert.match(cashier, /pay-tag badg badg-sm mr6/);
assert.match(cashier, /muted-box padding-h6 line-16/);
assert.match(cashier, /payment-method-radio hollow-radio flex-auto pointer/);
assert.match(cashier, /mt6 but jb-red initiate-pay btn-block radius/);
assert.match(cashier, /data-aksrt-payment-method/);
assert.match(cashier, /pay-(?:balance|alipay|wechat|paypal|stripe)-logo\.svg/);
assert.doesNotMatch(cashier, /document\.createElement\(['"]style['"]\)/);
assert.doesNotMatch(cashier, /apiKind|_api_kind|payApiBase/);
assert.doesNotMatch(cashier, /\/(?:shop|forum|bbs)\//i);
assert.match(css, /\.aksrt-dl-modal \.modal-colorful-header/);
assert.match(css, /\.aksrt-dl-modal \.payment-method-radio/);
assert.match(css, /\.aksrt-dl-modal \.but\.initiate-pay/);
assert.match(assets, /assets\/css\/frontend\/cms-download\.css/);
assert.match(assets, /filemtime\(\$cms_download_css_path\)/);
for (const logo of ['balance', 'alipay', 'wechat', 'paypal', 'stripe']) {
assert.equal(fs.existsSync(path.join(root, `assets/img/pay-${logo}-logo.svg`)), true);
}
});