修复了一些问题
This commit is contained in:
@@ -25,6 +25,9 @@ const headerNavbar = read('inc/helpers/header/aksrt-header-navbar.php')
|
||||
const headerUserbox = read('inc/helpers/aksrt-header-userbox.php')
|
||||
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 zibllMainCss = read('assets/vendor/zibll/css/main.css')
|
||||
|
||||
function activeRepositorySource() {
|
||||
const roots = ['assets/admin/src', 'assets/js', 'inc', 'src', 'templates']
|
||||
@@ -126,6 +129,25 @@ test('VIP navigation purchase switches are saved and consumed end to end', () =>
|
||||
assert.match(headerNavbar, /!empty\(\$vs\['enabled'\]\) && !empty\(\$vs\['nav_user_pay_vip'\]\)/)
|
||||
})
|
||||
|
||||
test('header VIP hover cards match the Zibll markup and style contract', () => {
|
||||
assert.match(vipCardRenderer, /aksrt_get_lazy_attr\('lazy_other', \$icon_url, 'img-icon'\)/)
|
||||
assert.match(vipCardRenderer, /<div class=\"abs-center vip-baicon\"[^>]*>/)
|
||||
assert.match(vipCardRenderer, /<div class=\"vip-img abs-right\">/)
|
||||
assert.match(vipCardRenderer, /<div class=\"vip-name mb10\"><span class=\"mr6\">/)
|
||||
assert.match(vipCardRenderer, /<ul class=\"mb10 relative\">/)
|
||||
assert.doesNotMatch(vipCardRenderer, /vip-name__(?:icon|label)/)
|
||||
assert.doesNotMatch(vipCardRenderer, /aksrt_format_vip_equity_html\(\$equity, 'mb10 relative'\)/)
|
||||
|
||||
assert.doesNotMatch(vipModalCss, /Header hover VIP cards/)
|
||||
assert.doesNotMatch(vipModalCss, /\.navbar-vip-hover\.hover-show/)
|
||||
assert.doesNotMatch(vipModalCss, /\.sub-vip-card/)
|
||||
assert.doesNotMatch(vipModalCss, /\.vip-card\.vip-theme[12]/)
|
||||
assert.match(zibllMainCss, /\.sub-vip-card\s*\{[^}]*font-size:\s*12px;[^}]*padding:\s*0\s*!important;/s)
|
||||
assert.match(zibllMainCss, /\.sub-vip-card \.vip-card\s*\{[^}]*display:\s*inline-block;[^}]*width:\s*240px;[^}]*margin:\s*5px;/s)
|
||||
assert.match(zibllMainCss, /\.sub-vip-card \.vip-baicon\.abs-center\s*\{[^}]*font-size:\s*10em;[^}]*left:\s*55%;/s)
|
||||
assert.match(zibllMainCss, /\.sub-vip-card \.vip-img\s*\{[^}]*display:\s*none;/s)
|
||||
})
|
||||
|
||||
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\)/)
|
||||
|
||||
Reference in New Issue
Block a user