修复了一些问题

This commit is contained in:
2026-08-21 14:39:30 +08:00
parent 3368261d52
commit b39bcbc53c
3 changed files with 19 additions and 1 deletions
@@ -27,6 +27,8 @@ const headerSearch = read('inc/helpers/header/aksrt-header-menu-search.php')
const headerCss = read('assets/css/frontend/header-userbox.css')
const vipCardRenderer = read('src/Content/VipServiceModal.php')
const vipModalCss = read('assets/css/frontend/vip-modal.css')
const payVipJs = read('assets/js/pay-vip.js')
const modalRuntimeJs = read('assets/js/core/modal-runtime.js')
const zibllMainCss = read('assets/vendor/zibll/css/main.css')
function activeRepositorySource() {
@@ -148,6 +150,14 @@ test('header VIP hover cards match the Zibll markup and style contract', () => {
assert.match(zibllMainCss, /\.sub-vip-card \.vip-img\s*\{[^}]*display:\s*none;/s)
})
test('VIP purchase modal matches Zibll desktop-center and mobile-bottom positioning', () => {
const purchaseModal = payVipJs.slice(payVipJs.indexOf('function vipPay('), payVipJs.indexOf('function onDocClick('))
assert.doesNotMatch(purchaseModal, /mobileBottom:\s*false/)
assert.match(modalRuntimeJs, /options\.mobileBottom !== false && isMobile\(\)/)
assert.match(vipModalCss, /@media \(max-width: 768px\)[\s\S]*?\.aksrt-vip-modal-shell\.aksrt-modal-runtime--bottom \.aksrt-modal-runtime__dialog\s*\{[\s\S]*?width:\s*100%;[\s\S]*?max-height:\s*calc\(100vh - 20px\);[\s\S]*?border-radius:\s*16px 16px 0 0;/)
})
test('schema REST saves are privileged, section-whitelisted, and deeply sanitized', () => {
assert.match(controllerBase, /current_user_can\('manage_options'\)/)
assert.match(controllerBase, /sanitize_payload\(\$domain, \$payload, \$section\)/)