refactor: rename the theme brand and every identifier from AKSRT to Jio
Full-project rename. `git grep -i aksrt` is now empty apart from the
DBMigrator 3.3.0 changelog note that documents the rename itself.
Code identifiers
- PHP namespace AKSRT\ -> Jio\ (composer PSR-4 + 378 declarations)
- global constants AKSRT_* -> JIO_* (VERSION/DIR/URI, PAY_TYPE_*, CAPTCHA_*)
- procedural functions, hooks, options, meta keys, table names,
cookies, query vars, ajax actions and nonces: aksrt_ -> jio_
- text domain aksrt -> jio; Theme Name -> Jio
- JS globals: aksrtData/aksrtAdminData/... -> jioData/jioAdminData/...,
window.AKSRTCaptcha & friends -> window.JioCaptcha, Aksrt* -> Jio*
- Vue components Aks*.vue -> Jio*.vue (15 files renamed + imports)
- CSS classes/data-attrs/custom properties: aksrt- -> jio-
- REST namespace aksrt/v1 -> jio/v1 (incl. payment gateway callbacks)
Storage layer
- DB tables {prefix}aksrt_* -> {prefix}jio_*; SCHEMA_VERSION 3.2.0 -> 3.3.0
so dbDelta creates the new names on install
- widget id_base aksrt_widget_* -> jio_widget_*
- uninstall.php drop list rebuilt from the actual migrator tables
(dropped 3 stale entries, added the 17 missing ones)
Removed
- hardcoded https://api.aksrt.com/version.json default update endpoint;
get_endpoint() now reads the 「更新端点」 setting and do_check() no-ops
when it is empty
Files renamed: inc/helpers/aksrt-*.php -> jio-*.php (54),
assets/admin/src/components/form/Aks*.vue -> Jio*.vue (15).
Build artifacts regenerated: assets/css/build, assets/js/runtime,
assets/admin/build.
Verified: audit-psr4-paths errors=0, audit-admin-contracts errors=0
(warnings=56, unchanged baseline), 813/813 widget-system tests,
44/44 phpunit, php -l clean across all PHP.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
5b16bc6e15
commit
35bb96e82f
997 files changed
+28216
-28188
No files matched your search
@@ -12,7 +12,7 @@ const read = (file) => fs.readFileSync(path.join(root, file), 'utf8');
|
||||
function renderHeaderParts() {
|
||||
const php = String.raw`
|
||||
define('ABSPATH', __DIR__ . '/');
|
||||
$GLOBALS['aksrt_test_user_id'] = 0;
|
||||
$GLOBALS['jio_test_user_id'] = 0;
|
||||
function esc_attr($value) { return htmlspecialchars((string) $value, ENT_QUOTES); }
|
||||
function esc_html($value) { return htmlspecialchars((string) $value, ENT_QUOTES); }
|
||||
function esc_attr__($value, $domain = null) { return esc_attr($value); }
|
||||
@@ -20,23 +20,23 @@ function esc_html__($value, $domain = null) { return esc_html($value); }
|
||||
function esc_url($value) { return $value; }
|
||||
function esc_url_raw($value) { return $value; }
|
||||
function home_url($path = '/') { return 'https://example.test' . $path; }
|
||||
function get_bloginfo($field = '') { return 'AKSRT'; }
|
||||
function get_current_user_id() { return (int) $GLOBALS['aksrt_test_user_id']; }
|
||||
function get_bloginfo($field = '') { return 'Jio'; }
|
||||
function get_current_user_id() { return (int) $GLOBALS['jio_test_user_id']; }
|
||||
function get_option($name, $default = false) { return $name === 'users_can_register'; }
|
||||
function aksrt_render_header_menu_buttons() { return '<a class="newadd-btns">发布</a>'; }
|
||||
function aksrt_get_translate_language_btn($class = '') { return '<a class="' . esc_attr($class) . '">语言</a>'; }
|
||||
function aksrt_header_user_box_html($ctx) { return '<div class="sub-user-box">账户</div>'; }
|
||||
function aksrt_get_avatar_html($userId, $size, $args = []) { return '<img class="avatar" width="' . (int) $size . '">'; }
|
||||
function jio_render_header_menu_buttons() { return '<a class="newadd-btns">发布</a>'; }
|
||||
function jio_get_translate_language_btn($class = '') { return '<a class="' . esc_attr($class) . '">语言</a>'; }
|
||||
function jio_header_user_box_html($ctx) { return '<div class="sub-user-box">账户</div>'; }
|
||||
function jio_get_avatar_html($userId, $size, $args = []) { return '<img class="avatar" width="' . (int) $size . '">'; }
|
||||
function has_nav_menu($location) { return false; }
|
||||
function is_super_admin() { return false; }
|
||||
function is_singular($type = '') { return false; }
|
||||
require __DIR__ . '/inc/helpers/header/aksrt-header-navbar.php';
|
||||
require __DIR__ . '/inc/helpers/header/aksrt-header-mobile.php';
|
||||
require __DIR__ . '/inc/helpers/header/jio-header-navbar.php';
|
||||
require __DIR__ . '/inc/helpers/header/jio-header-mobile.php';
|
||||
|
||||
$results = [];
|
||||
foreach (['1', '2', '3'] as $layout) {
|
||||
foreach ([0, 7] as $userId) {
|
||||
$GLOBALS['aksrt_test_user_id'] = $userId;
|
||||
$GLOBALS['jio_test_user_id'] = $userId;
|
||||
$ctx = [
|
||||
'layout' => $layout,
|
||||
'user_id' => $userId,
|
||||
@@ -45,28 +45,28 @@ foreach (['1', '2', '3'] as $layout) {
|
||||
'messages_url' => '',
|
||||
'unread_count' => 0,
|
||||
'mobile_layout' => 'center',
|
||||
'brand_name' => 'AKSRT',
|
||||
'brand_name' => 'Jio',
|
||||
'logo_html' => '',
|
||||
];
|
||||
ob_start(); aksrt_menu_button($ctx); $buttons = ob_get_clean();
|
||||
ob_start(); jio_menu_button($ctx); $buttons = ob_get_clean();
|
||||
$results['desktop'][$layout][$userId] = $buttons;
|
||||
}
|
||||
$ctx['message_icon_positions'] = ['nav_menu'];
|
||||
$ctx['messages_url'] = 'https://example.test/messages';
|
||||
$ctx['unread_count'] = 3;
|
||||
ob_start(); aksrt_menu_button($ctx); $results['notifications'][$layout] = ob_get_clean();
|
||||
ob_start(); jio_menu_button($ctx); $results['notifications'][$layout] = ob_get_clean();
|
||||
}
|
||||
foreach (['center', 'left'] as $mobileLayout) {
|
||||
$ctx = [
|
||||
'mobile_layout' => $mobileLayout,
|
||||
'mobile_align' => 'left',
|
||||
'theme_positions' => [],
|
||||
'brand_name' => 'AKSRT',
|
||||
'brand_name' => 'Jio',
|
||||
'logo_html' => '',
|
||||
'user_id' => 0,
|
||||
];
|
||||
ob_start(); aksrt_navbar_header($ctx); $results['mobile'][$mobileLayout]['header'] = ob_get_clean();
|
||||
ob_start(); aksrt_nav_mobile_content($ctx); $results['mobile'][$mobileLayout]['drawer'] = ob_get_clean();
|
||||
ob_start(); jio_navbar_header($ctx); $results['mobile'][$mobileLayout]['header'] = ob_get_clean();
|
||||
ob_start(); jio_nav_mobile_content($ctx); $results['mobile'][$mobileLayout]['drawer'] = ob_get_clean();
|
||||
}
|
||||
echo json_encode($results, JSON_UNESCAPED_SLASHES);
|
||||
`;
|
||||
@@ -82,9 +82,9 @@ test('rendered desktop layouts retain reference control order for guests and mem
|
||||
const html = output.desktop[layout][userId];
|
||||
assert.match(html, /class="but" aria-label=/, `layout ${layout} menu fold`);
|
||||
assert.match(html, /class="list-inline splitters relative"/, `layout ${layout} account list`);
|
||||
assert.doesNotMatch(html, /aksrt-navbar-account|aksrt-nav-avatar/);
|
||||
assert.doesNotMatch(html, /jio-navbar-account|jio-nav-avatar/);
|
||||
if (layout === '2' && userId === '0') assert.match(html, /class="signin-loader"/);
|
||||
else assert.match(html, /class="aksrt-nav-icon[^"]*"|class="navbar-avatar"/);
|
||||
else assert.match(html, /class="jio-nav-icon[^"]*"|class="navbar-avatar"/);
|
||||
const right = html.indexOf('list-inline splitters relative');
|
||||
const actions = html.indexOf('navbar-but');
|
||||
if (layout === '3' && actions !== -1) assert.ok(right < actions, 'layout 3 puts account group before actions');
|
||||
@@ -120,14 +120,14 @@ test('account icons keep the reference spacing on both sides of each divider', (
|
||||
assert.doesNotMatch(account[1], /<\/li>\s+<li\b/, 'extra text space shifts the divider');
|
||||
assert.doesNotMatch(account[1], /<\/li>\s+$/, 'trailing text space widens the action group');
|
||||
}
|
||||
assert.match(output.notifications['1'], /aksrt-nav-notification/);
|
||||
assert.match(output.notifications['1'], /jio-nav-notification/);
|
||||
});
|
||||
|
||||
test('header source restores the reference typography and Bootstrap control dimensions', () => {
|
||||
const css = read('assets/css/frontend/header-userbox.css');
|
||||
const mainCss = read('assets/css/main.css');
|
||||
assert.match(css, /\.header,\s*\.mobile-header,\s*\.navbar-search\s*\{[^}]*font-family:\s*"Helvetica Neue", Helvetica, Arial, sans-serif;[^}]*font-size:\s*14px;[^}]*font-weight:\s*400;[^}]*line-height:\s*1\.42857143;[^}]*-webkit-font-smoothing:\s*auto;[^}]*text-rendering:\s*auto;/s);
|
||||
assert.match(css, /\.navbar-top \.aksrt-nav-icon\s*\{[^}]*display:\s*inline-block;[^}]*padding:\s*6px 12px;[^}]*font-size:\s*14px;[^}]*line-height:\s*1\.42857143;[^}]*border:\s*1px solid transparent;[^}]*border-radius:\s*4px;/s);
|
||||
assert.match(css, /\.navbar-top \.jio-nav-icon\s*\{[^}]*display:\s*inline-block;[^}]*padding:\s*6px 12px;[^}]*font-size:\s*14px;[^}]*line-height:\s*1\.42857143;[^}]*border:\s*1px solid transparent;[^}]*border-radius:\s*4px;/s);
|
||||
assert.match(mainCss, /\.navbar-avatar\s*\{[^}]*margin-top:\s*3px;[^}]*width:\s*29px;[^}]*height:\s*29px;/s);
|
||||
assert.doesNotMatch(css, /\.aksrt-navbar-account|\.aksrt-nav-avatar|\.navbar-form \.toggle-radius:not|navbar-form\.flex\.ac\s*\{[^}]*min-height|\.navbar-search(?:\.show)?\s*\{[^}]*transform:/s);
|
||||
assert.doesNotMatch(css, /\.jio-navbar-account|\.jio-nav-avatar|\.navbar-form \.toggle-radius:not|navbar-form\.flex\.ac\s*\{[^}]*min-height|\.navbar-search(?:\.show)?\s*\{[^}]*transform:/s);
|
||||
});
|
||||
@@ -28,20 +28,20 @@ const scripts = join([
|
||||
'src/Core/ScriptsPart1b.php',
|
||||
'src/Core/ScriptsPart1c.php',
|
||||
]);
|
||||
// The Font Awesome handle is registered inside aksrt_enqueue_fontawesome(), so the
|
||||
// The Font Awesome handle is registered inside jio_enqueue_fontawesome(), so the
|
||||
// 5.15.4 asset contract has to follow that indirection rather than the enqueue call site.
|
||||
const iconRuntime = join([
|
||||
'src/Core/ScriptsPart1b.php',
|
||||
'src/Core/ScriptsPart1c.php',
|
||||
'inc/helpers/aksrt-icons.php',
|
||||
'inc/helpers/jio-icons.php',
|
||||
]);
|
||||
const header = join([
|
||||
'header.php',
|
||||
'inc/helpers/header/aksrt-header-render.php',
|
||||
'inc/helpers/header/aksrt-header-navbar.php',
|
||||
'inc/helpers/header/aksrt-header-mobile.php',
|
||||
'inc/helpers/aksrt-header-menu-buttons.php',
|
||||
'inc/helpers/aksrt-header-userbox.php',
|
||||
'inc/helpers/header/jio-header-render.php',
|
||||
'inc/helpers/header/jio-header-navbar.php',
|
||||
'inc/helpers/header/jio-header-mobile.php',
|
||||
'inc/helpers/jio-header-menu-buttons.php',
|
||||
'inc/helpers/jio-header-userbox.php',
|
||||
]);
|
||||
|
||||
test('the public dependency graph uses WordPress jQuery with the local runtime stack', () => {
|
||||
@@ -49,7 +49,7 @@ test('the public dependency graph uses WordPress jQuery with the local runtime s
|
||||
assert.doesNotMatch(scripts, /wp_deregister_script\('jquery'\)/);
|
||||
assert.doesNotMatch(scripts, /jquery\.min\.js'[\s\S]*?'1\.9\.1'/);
|
||||
assert.match(scripts, /bootstrap\.min\.css'[\s\S]*?'3\.4\.1'/);
|
||||
assert.match(scripts, /aksrt_enqueue_fontawesome\(/);
|
||||
assert.match(scripts, /jio_enqueue_fontawesome\(/);
|
||||
assert.match(iconRuntime, /fontawesome5\/css\/all\.min\.css'[\s\S]*?'5\.15\.4'/);
|
||||
assert.match(scripts, /main\.min\.css/);
|
||||
assert.match(scripts, /loader\.js'[\s\S]*?\['jquery', 'bootstrap'\]/);
|
||||
@@ -63,7 +63,7 @@ test('the public dependency graph uses WordPress jQuery with the local runtime s
|
||||
'assets/js/runtime/main.min.js',
|
||||
]) assert.equal(exists(file), true, `${file} must be local`);
|
||||
|
||||
assert.doesNotMatch(scripts, /bootstrap5|bootstrap-5|font-awesome\.min\.css|swiper(?:\.min)?\.(?:css|js)|aksrt-mini-touch/);
|
||||
assert.doesNotMatch(scripts, /bootstrap5|bootstrap-5|font-awesome\.min\.css|swiper(?:\.min)?\.(?:css|js)|jio-mini-touch/);
|
||||
assert.equal(exists('assets/css/frontend/nav.css'), false);
|
||||
assert.equal(exists('assets/js/core/nav.js'), false);
|
||||
assert.equal(exists('assets/js/core/search.js'), false);
|
||||
@@ -72,7 +72,7 @@ test('the public dependency graph uses WordPress jQuery with the local runtime s
|
||||
assert.equal(exists('assets/js/mini-touch.js'), false);
|
||||
});
|
||||
|
||||
test('payment entry points use only the AKSRT payment runtime', () => {
|
||||
test('payment entry points use only the Jio payment runtime', () => {
|
||||
const loader = read('assets/js/runtime/loader.js');
|
||||
const main = join([
|
||||
'assets/js/runtime/main.js',
|
||||
@@ -88,9 +88,9 @@ test('payment entry points use only the AKSRT payment runtime', () => {
|
||||
assert.doesNotMatch(main, /tbquire\(\[['"]pay['"]\]\)/);
|
||||
assert.doesNotMatch(main, /indexOf\(['"]zippay['"]\)/);
|
||||
assert.match(paymentRuntime, /\.pay-vip/);
|
||||
assert.match(paymentRuntime, /data-aksrt-pay-content/);
|
||||
assert.match(paymentRuntime, /'aksrt-pay-vip'/);
|
||||
assert.match(paymentRuntime, /'aksrt-cms-download'/);
|
||||
assert.match(paymentRuntime, /data-jio-pay-content/);
|
||||
assert.match(paymentRuntime, /'jio-pay-vip'/);
|
||||
assert.match(paymentRuntime, /'jio-cms-download'/);
|
||||
});
|
||||
|
||||
test('Font Awesome 5 is the only icon contract across every runtime path', () => {
|
||||
@@ -159,7 +159,7 @@ test('guest account member VIP and publish contracts share reference header DOM'
|
||||
const userboxCss = read('assets/css/frontend/header-userbox.css');
|
||||
|
||||
assert.match(header, /is_user_logged_in\(\)/);
|
||||
assert.match(header, /sub-user-box aksrt-header-userbox/);
|
||||
assert.match(header, /sub-user-box jio-header-userbox/);
|
||||
assert.match(header, /signin-loader|signin/);
|
||||
assert.match(header, /get_payment_vip_settings/);
|
||||
assert.match(header, /nav_user_newposts_btn/);
|
||||
@@ -173,12 +173,12 @@ test('guest account member VIP and publish contracts share reference header DOM'
|
||||
assert.doesNotMatch(userboxCss, /--(?:main|muted|key)-|@import/);
|
||||
// Account rows render through the shared legacy classes; the module keeps only
|
||||
// the shell anchoring, the account href geometry and the top-nav bell badge.
|
||||
assert.match(userboxCss, /\.aksrt-nav-notification \.aksrt-notification-badge/);
|
||||
assert.doesNotMatch(userboxCss, /aksrt-header-wallet|aksrt-header-checkin|aksrt-header-payvip|\.aksrt-header-userbox \.aksrt-notification-badge/);
|
||||
assert.match(userboxCss, /\.jio-nav-notification \.jio-notification-badge/);
|
||||
assert.doesNotMatch(userboxCss, /jio-header-wallet|jio-header-checkin|jio-header-payvip|\.jio-header-userbox \.jio-notification-badge/);
|
||||
assert.doesNotMatch(userboxCss, /width:\s*260px/);
|
||||
assert.match(userboxCss, /\.aksrt-header-userbox\s*\{[^}]*line-height:\s*1\.42857143/s);
|
||||
assert.match(userboxCss, /\.aksrt-header-userbox\s+\.muted-box\.padding-6\s*\{[^}]*background-color:\s*var\(--this-bg,\s*var\(--color-line-soft\)\)[^}]*border-radius:\s*4px[^}]*padding:\s*6px/s);
|
||||
assert.match(userboxCss, /\.aksrt-header-userbox\s*>\s*\.mt6\.em09\s*>\s*\.but\.block\s*\{[^}]*display:\s*block;[^}]*box-sizing:\s*border-box;[^}]*width:\s*100%;/s);
|
||||
assert.match(userboxCss, /\.jio-header-userbox\s*\{[^}]*line-height:\s*1\.42857143/s);
|
||||
assert.match(userboxCss, /\.jio-header-userbox\s+\.muted-box\.padding-6\s*\{[^}]*background-color:\s*var\(--this-bg,\s*var\(--color-line-soft\)\)[^}]*border-radius:\s*4px[^}]*padding:\s*6px/s);
|
||||
assert.match(userboxCss, /\.jio-header-userbox\s*>\s*\.mt6\.em09\s*>\s*\.but\.block\s*\{[^}]*display:\s*block;[^}]*box-sizing:\s*border-box;[^}]*width:\s*100%;/s);
|
||||
});
|
||||
|
||||
test('the top navigation keeps the reference Bootstrap control geometry', () => {
|
||||
@@ -186,8 +186,8 @@ test('the top navigation keeps the reference Bootstrap control geometry', () =>
|
||||
const publicCss = read('assets/css/build/public.css');
|
||||
|
||||
assert.match(userboxCss, /\.header,\s*\.mobile-header,\s*\.navbar-search\s*\{[^}]*font-family:\s*['"]Helvetica Neue['"],\s*Helvetica,\s*Arial,\s*sans-serif;[^}]*font-weight:\s*400;[^}]*line-height:\s*1\.42857143;/s);
|
||||
assert.match(userboxCss, /\.navbar-top \.aksrt-nav-icon\s*\{[^}]*display:\s*inline-block;[^}]*padding:\s*6px 12px;[^}]*font-size:\s*14px;[^}]*line-height:\s*1\.42857143;[^}]*border:\s*1px solid transparent;[^}]*border-radius:\s*4px;/s);
|
||||
assert.doesNotMatch(userboxCss, /\.aksrt-navbar-account|\.aksrt-nav-avatar|\.navbar-form \.toggle-radius:not|navbar-form\.flex\.ac\s*\{[^}]*min-height|\.aksrt-navbar-language\s*\{[^}]*margin:/);
|
||||
assert.match(userboxCss, /\.navbar-top \.jio-nav-icon\s*\{[^}]*display:\s*inline-block;[^}]*padding:\s*6px 12px;[^}]*font-size:\s*14px;[^}]*line-height:\s*1\.42857143;[^}]*border:\s*1px solid transparent;[^}]*border-radius:\s*4px;/s);
|
||||
assert.doesNotMatch(userboxCss, /\.jio-navbar-account|\.jio-nav-avatar|\.navbar-form \.toggle-radius:not|navbar-form\.flex\.ac\s*\{[^}]*min-height|\.jio-navbar-language\s*\{[^}]*margin:/);
|
||||
assert.doesNotMatch(publicCss, /\.navbar-top \.navbar-form \.toggle-radius:not\(\.social-login-item\)/);
|
||||
});
|
||||
|
||||
@@ -221,23 +221,23 @@ test('route and feature modules do not restyle the legacy top-nav chips', () =>
|
||||
})
|
||||
|
||||
test('the account popover rows match the reference user box structure', () => {
|
||||
const identity = read('inc/helpers/aksrt-identity.php');
|
||||
const identity = read('inc/helpers/jio-identity.php');
|
||||
const legacyMainCss = read('assets/css/main.css');
|
||||
const buttonsCss = read('assets/css/core/buttons.css');
|
||||
const userboxCss = read('assets/css/frontend/header-userbox.css');
|
||||
|
||||
// Stats row is wired with the reference wrapper and carries the posts chip.
|
||||
assert.match(header, /aksrt_header_user_badges_row\(\$user_id\)/);
|
||||
assert.match(header, /jio_header_user_badges_row\(\$user_id\)/);
|
||||
assert.match(header, /class="em09 author-tag mb10 mt6 flex jc"/);
|
||||
assert.match(identity, /tag-posts/);
|
||||
assert.match(identity, /fa fas fa-file-alt/);
|
||||
assert.match(identity, /fa fas fa-comment-dots/);
|
||||
assert.match(identity, /fa fas fa-thumbs-up/);
|
||||
assert.match(identity, /fa fas fa-fire/);
|
||||
assert.doesNotMatch(identity, /aksrt_renderer_svg_icon/);
|
||||
assert.doesNotMatch(identity, /jio_renderer_svg_icon/);
|
||||
|
||||
// Admin row exposes the AKSRT payment center at the reference mall slot.
|
||||
assert.match(header, /admin\.php\?page=aksrt_pay/);
|
||||
// Admin row exposes the Jio payment center at the reference mall slot.
|
||||
assert.match(header, /admin\.php\?page=jio_pay/);
|
||||
assert.match(header, /支付中心/);
|
||||
|
||||
// Wallet tiles: balance first, muted-box geometry, reference sprite icons.
|
||||
@@ -245,8 +245,8 @@ test('the account popover rows match the reference user box structure', () => {
|
||||
assert.match(header, /muted-box padding-6 flex1 radius4/);
|
||||
assert.match(header, /font-bold c-blue-2/);
|
||||
assert.match(header, /font-bold c-yellow/);
|
||||
assert.match(header, /aksrt_icon_markup\('zibsvg-money-color-2', 'em14'\)/);
|
||||
assert.match(header, /aksrt_icon_markup\('zibsvg-points-color', 'em14'\)/);
|
||||
assert.match(header, /jio_icon_markup\('zibsvg-money-color-2', 'em14'\)/);
|
||||
assert.match(header, /jio_icon_markup\('zibsvg-points-color', 'em14'\)/);
|
||||
// The value icons are the reference theme's multi-tone SVGs, not FA5 glyphs;
|
||||
// the tile arrow stays on fa-angle-right exactly as the reference renders it.
|
||||
assert.doesNotMatch(header, /fa fas fa-money-bill-wave/);
|
||||
@@ -267,18 +267,18 @@ test('the account popover rows match the reference user box structure', () => {
|
||||
// cover background, color, border and text-shadow, and must not be scoped to
|
||||
// one call site or the top-nav chip keeps the wrong gradient.
|
||||
assert.match(userboxCss, /\.payvip-icon\s*\{[\s\S]*?background:\s*linear-gradient\(300deg,[\s\S]*?color:\s*#ece0e0;[\s\S]*?--this-color:\s*#ece0e0;[\s\S]*?border:\s*none;[\s\S]*?text-shadow:\s*none;/s);
|
||||
assert.doesNotMatch(userboxCss, /\.aksrt-header-userbox \.pay-vip\.but\.payvip-icon/)
|
||||
assert.doesNotMatch(userboxCss, /\.jio-header-userbox \.pay-vip\.but\.payvip-icon/)
|
||||
assert.doesNotMatch(header, /vipbg-v2/);
|
||||
|
||||
// Check-in entry is an anchor with the reference button classes.
|
||||
assert.match(header, /but block c-yellow/);
|
||||
assert.match(header, /aksrt_get_user_checkin_details_link\([\s\S]*?'but block c-yellow'/);
|
||||
assert.match(header, /jio_get_user_checkin_details_link\([\s\S]*?'but block c-yellow'/);
|
||||
assert.match(header, /checkin-details-link/);
|
||||
assert.match(buttonsCss, /\.but\.block\s*\{\s*display:\s*block;\s*\}/);
|
||||
assert.match(buttonsCss, /\.btn-block\s*\{\s*display:\s*block;\s*width:\s*100%;\s*\}/);
|
||||
// The hover wrapper uses the reference inline-block utility so the absolutely
|
||||
// positioned VIP card keeps its original static position.
|
||||
assert.match(read('inc/helpers/aksrt-header-menu-buttons.php'), /class="hover-show inline-block"/);
|
||||
assert.match(read('inc/helpers/jio-header-menu-buttons.php'), /class="hover-show inline-block"/);
|
||||
assert.match(legacyMainCss, /\.navbar-top \.navbar-but \.but\s*\{[^}]*font-size:\s*0\.8em;[^}]*padding:\s*0\.3em 1em !important;[^}]*margin:\s*0\.4em;/s);
|
||||
assert.doesNotMatch(read('assets/css/frontend/header-userbox.css'), /\.navbar-top \.navbar-but > \.hover-show/);
|
||||
assert.doesNotMatch(header, /but block c-yellow[^"']*btn-block/);
|
||||
@@ -303,7 +303,7 @@ test('the only menu metadata and Walker contract is the legacy runtime', () => {
|
||||
const decoration = read('inc/helpers/menu-decoration.php');
|
||||
const source = walker + menuAdmin + decoration;
|
||||
|
||||
assert.match(source, /aksrt_menu_options/);
|
||||
assert.match(source, /jio_menu_options/);
|
||||
assert.doesNotMatch(source, /zib_menu_options/);
|
||||
assert.match(walker, /start_lvl|start_el|end_el/);
|
||||
assert.match(walker, /submenu_graphic_card/);
|
||||
@@ -317,13 +317,13 @@ test('the only menu metadata and Walker contract is the legacy runtime', () => {
|
||||
});
|
||||
|
||||
test('search is footer-lazy and exposes only reference actions and request fields', () => {
|
||||
const shell = read('inc/helpers/header/aksrt-header-menu-search.php');
|
||||
const box = read('inc/helpers/search/aksrt-search-box.php');
|
||||
const shell = read('inc/helpers/header/jio-header-menu-search.php');
|
||||
const box = read('inc/helpers/search/jio-search-box.php');
|
||||
const results = read('search.php');
|
||||
const settings = read('src/Settings/ThemeSearch.php');
|
||||
const source = shell + box + results + settings;
|
||||
|
||||
assert.match(shell, /add_action\('wp_footer', 'aksrt_footer_navbar_search'/);
|
||||
assert.match(shell, /add_action\('wp_footer', 'jio_footer_navbar_search'/);
|
||||
assert.match(shell, /wp_ajax_menu_search/);
|
||||
assert.match(shell, /wp_ajax_search_box/);
|
||||
assert.match(shell, /wp_verify_nonce/);
|
||||
@@ -335,9 +335,9 @@ test('search is footer-lazy and exposes only reference actions and request field
|
||||
assert.match(box, /array_slice\(\$history, 0, 30\)/);
|
||||
assert.match(box, /search_keywords/);
|
||||
assert.match(settings, /search_custom_key/);
|
||||
assert.match(settings, /aksrt_search_terms\.name LIKE/);
|
||||
assert.match(settings, /jio_search_terms\.name LIKE/);
|
||||
assert.match(results, /search-tab-filter/);
|
||||
assert.match(results, /aksrt_get_search_tab_nav_filter/);
|
||||
assert.match(results, /jio_get_search_tab_nav_filter/);
|
||||
assert.equal(exists('templates/parts/navbar-search.php'), false);
|
||||
assert.equal(exists('templates/parts/search-panel.php'), false);
|
||||
});
|
||||
@@ -366,8 +366,8 @@ test('header slider is the only top visual path and uses global plus page_config
|
||||
const defaults = read('src/Settings/DisplayPageGroups.php');
|
||||
const source = renderer + globalSchema + pageMeta + defaults;
|
||||
|
||||
assert.match(renderer, /function aksrt_header_slide\(\): void/);
|
||||
assert.match(renderer, /function aksrt_header_slide_is_show\(\): bool/);
|
||||
assert.match(renderer, /function jio_header_slide\(\): void/);
|
||||
assert.match(renderer, /function jio_header_slide_is_show\(\): bool/);
|
||||
assert.match(pageMeta, /page_config/);
|
||||
for (const key of [
|
||||
'header_slider_show', 'header_slider_show_type', 'header_slider_nav_color',
|
||||
@@ -404,6 +404,6 @@ test('old navigation settings and runtime handles do not survive the hard switch
|
||||
'src/Core/ScriptsPart1c.php',
|
||||
'assets/js/runtime/main.js',
|
||||
]);
|
||||
assert.doesNotMatch(source, /bootstrap5|aksrt-mini-touch|aksrt\.Drawer|aksrt\.minitouch|updateScrollBus/);
|
||||
assert.doesNotMatch(source, /aksrt_nav_|legacy_nav|nav_compat/);
|
||||
assert.doesNotMatch(source, /bootstrap5|jio-mini-touch|jio\.Drawer|jio\.minitouch|updateScrollBus/);
|
||||
assert.doesNotMatch(source, /jio_nav_|legacy_nav|nav_compat/);
|
||||
});
|
||||
Reference in new issue
Block a user