修复了一些问题

This commit is contained in:
2026-08-25 18:31:49 +08:00
parent c8d199a694
commit 3dbd196e06
9 changed files with 99 additions and 25 deletions
@@ -21,6 +21,30 @@ test('message notification settings are a canonical user/msg inline panel', () =
assert.match(routing, /'revenue', 'msg', 'settings'/);
});
test('notification icon positions map to their four render locations', () => {
const phpSchema = read('src/Admin/Schema/SchemaUsers.php');
const jsSchema = read('assets/admin/src/schema/sections/users/notifications.js');
const integration = read('src/Settings/Integration.php');
const header = read('inc/helpers/header/aksrt-header-navbar.php');
const userCenter = read('inc/helpers/aksrt-user-center.php');
const userHome = read('templates/parts/user/author-hero.php');
for (const source of [phpSchema, jsSchema]) {
assert.match(source, /message_icon_show/);
assert.match(source, /导航菜单/);
assert.match(source, /头像下拉面板/);
assert.match(source, /用户中心顶部资料卡/);
assert.match(source, /公开主页顶部资料卡/);
}
assert.match(integration, /\['nav_menu', 'avatar_dropdown', 'user_center_header', 'user_home_header'\]/);
assert.match(header, /in_array\('nav_menu', \$positions, true\)/);
assert.match(header, /in_array\('avatar_dropdown', \$positions, true\)/);
assert.match(header, /aksrt-nav-icon aksrt-nav-notification/);
assert.match(header, /\$notification_but \. \$sign_but \. \$search_but/);
assert.match(userCenter, /in_array\('user_center_header'/);
assert.match(userHome, /in_array\('user_home_header'/);
});
test('notification preference endpoint stores only the three boolean categories', () => {
const controller = read('src/User/NotificationPreferences.php');