收藏 Tab 现在和文章 Tab 走完全相同的渲染链路和样式

This commit is contained in:
2026-08-23 12:38:33 +08:00
parent c9c1789aba
commit 54ee4b3bdd
3 changed files with 62 additions and 66 deletions
@@ -321,10 +321,14 @@ test('profile routes load versioned leaf styles and keep dialogs hidden initiall
assert.match(accountModals, /id="email-modal" class="aksrt-modal" hidden/);
assert.match(userCenterJs, /function closeModal\(m\)[\s\S]*?m\.hidden = true;/);
assert.match(userHomeCss, /\.aksrt-profile-details-modal\[hidden\]\s*\{\s*display:\s*none\s*!important;\s*\}/);
assert.match(userHomeCss, /\.aksrt-user-home #panel-posts \.aksrt-user-home__post-list \.posts-item\s*\{[^}]*background:\s*transparent;[^}]*box-shadow:\s*none;/);
assert.match(userHomeCss, /@media \(min-width: 992px\)\s*\{[\s\S]*?\.aksrt-user-home #panel-posts \.aksrt-user-home__post-list\s*\{[^}]*display:\s*grid;[^}]*grid-template-columns:\s*repeat\(2,\s*minmax\(0,\s*1fr\)\);/);
assert.match(userHomeCss, /@media \(min-width: 992px\)\s*\{[\s\S]*?\.aksrt-user-home #panel-posts \.aksrt-user-home__post-list > \.posts-item\s*\{[^}]*width:\s*auto;[^}]*margin:\s*0 !important;/);
assert.match(userHomeCss, /@media \(max-width: 767px\)\s*\{[\s\S]*?\.aksrt-user-home #panel-posts \.aksrt-user-home__post-list \.posts-item\s*\{[^}]*padding:\s*10px 0;/);
assert.match(userHomeCss, /\.aksrt-user-home \.aksrt-user-home__post-list \.posts-item\s*\{[^}]*background:\s*transparent;[^}]*box-shadow:\s*none;/);
assert.match(userHomeCss, /@media \(min-width: 992px\)\s*\{[\s\S]*?\.aksrt-user-home \.aksrt-user-home__post-list\s*\{[^}]*display:\s*grid;[^}]*grid-template-columns:\s*repeat\(2,\s*minmax\(0,\s*1fr\)\);/);
assert.match(userHomeCss, /@media \(min-width: 992px\)\s*\{[\s\S]*?\.aksrt-user-home \.aksrt-user-home__post-list > \.posts-item\s*\{[^}]*width:\s*auto;[^}]*margin:\s*0 !important;/);
assert.match(userHomeCss, /@media \(max-width: 767px\)\s*\{[\s\S]*?\.aksrt-user-home \.aksrt-user-home__post-list \.posts-item\s*\{[^}]*padding:\s*10px 0;/);
const panelsCore = read('templates/parts/user-home/panels-core.php');
assert.match(panelsCore, /'page_var'\s*=>\s*'favorites_page'/);
assert.match(panelsCore, /array_merge\(\$user_home_render_config, \['wrapper_class' => 'aksrt-user-home__post-list'\]\), \$favorites_query\)/);
assert.doesNotMatch(panelsCore, /profile-list-item/);
assert.match(profileLayoutCss, /\.aksrt-cover-menu__panel\[hidden\]\s*\{\s*display:\s*none\s*!important;\s*\}/);
assert.match(profileLayoutCss, /#aksrt-bg-file-input\[hidden\],[\s\S]*?#aksrt-avatar-file-input\[hidden\][\s\S]*?display:\s*none\s*!important;/);
assert.match(settingsSecurity, /data-modal="email-modal"[\s\S]*?<\/button>\s*<\/div>\s*<div class="security-action-item">[\s\S]*?data-modal="phone-modal"/);