顶部多功能组件的图标卡片新增默认图标

This commit is contained in:
2026-08-20 12:34:41 +08:00
parent 13ed02c93a
commit 4d4baa9cec
4 changed files with 24 additions and 9 deletions
@@ -39,3 +39,18 @@ test('homepage horizontal cards render fully from Zibll CSS with no dedicated st
assert.doesNotMatch(scripts, /header-cards/);
assert.doesNotMatch(widgetCss, /aksrt-widget-icon-cards \.icon-cover-card/);
});
test('header icon-card defaults use bundled Font Awesome icons', () => {
const defaults = [
read('src/Admin/Schema/SchemaPageDisplay.php'),
read('src/Admin/PageConfigMetaBox.php'),
read('src/Settings/DisplayPageGroups.php'),
];
for (const source of defaults) {
assert.doesNotMatch(source, /'icon'\s*=>\s*'zibsvg-/);
for (const icon of ['gem', 'star', 'fire', 'wrench']) {
assert.match(source, new RegExp(`'icon'\\s*=>\\s*'fa fas fa-${icon}'`));
}
}
});