fix(theme): align reference layouts and restore passing contracts
Align homepage and category discovery, modern widgets, admin controls, quotes, and comments with the reference theme. Remove superseded paths and add rendering and behavior coverage. Update stale asset and finance contracts; all 760 Node tests and 139 widget assertions pass.
This commit is contained in:
1 parent
b520d29368
commit
8aa116ec43
63 files changed
+1985
-2304
No files matched your search
@@ -10,7 +10,7 @@
|
||||
* 3) 弹窗底部提示句与整条 help_text 管线已移除,顶部说明 desc 保留;
|
||||
* 4) 积分/钱包余额合并为一次 LedgerService::points_and_balance();
|
||||
* 5) 访问统计写库移到 shutdown,wp_head 只做访客判定与 setcookie;
|
||||
* 6) header-userbox 样式仅登录用户入队。
|
||||
* 6) header-userbox 样式由公共样式包提供,避免单独重复入队。
|
||||
*/
|
||||
const test = require('node:test');
|
||||
const assert = require('node:assert');
|
||||
@@ -129,6 +129,12 @@ test('访问统计写库移出渲染关键路径', () => {
|
||||
assert.match(recordStats, /cleanup_old_stats\(\)/);
|
||||
});
|
||||
|
||||
test('header-userbox 样式仅登录用户入队', () => {
|
||||
assert.match(scripts, /if \(is_user_logged_in\(\)\) \{\s*\$enqueue_module\('header-userbox'\);/);
|
||||
test('header-userbox styles ship once in the shared public bundle', () => {
|
||||
const builder = read('tools', 'build-public-assets.mjs');
|
||||
const bundle = read('assets', 'css', 'build', 'public.css');
|
||||
assert.strictEqual((builder.match(/'assets\/css\/frontend\/header-userbox\.css'/g) || []).length, 1);
|
||||
assert.strictEqual((bundle.match(/\/\* source: assets\/css\/frontend\/header-userbox\.css \*\//g) || []).length, 1);
|
||||
assert.match(bundle, /\.aksrt-header-userbox\s*\{/);
|
||||
assert.match(scripts, /wp_enqueue_style\(\s*'aksrt-public',[\s\S]*?\['aksrt-main'\]/);
|
||||
assert.doesNotMatch(scripts, /\$enqueue_module\('header-userbox'\)/);
|
||||
});
|
||||
Reference in new issue
Block a user