对小工具进行了一些修复
This commit is contained in:
@@ -19,8 +19,9 @@ test('icon card renderers keep vertical and horizontal legacy DOM contracts sepa
|
||||
assert.match(helper, /icon-cover-desc ml10 flex1 px12-sm/);
|
||||
assert.doesNotMatch(helper, /aksrt-icon-cover-card/);
|
||||
assert.match(widgets, /'customize_icon' => \$card\['customize_icon'\] \?\? ''/);
|
||||
assert.match(widgets, /'custom_icon'\s+=> \$card\['custom_icon'\] \?\? ''/);
|
||||
assert.match(widgets, /'icon_image'\s+=> \$card\['icon_image'\] \?\? ''/);
|
||||
assert.doesNotMatch(widgets, /\$card\['custom_icon'\]/);
|
||||
assert.doesNotMatch(widgets, /\$card\['icon_image'\]/);
|
||||
assert.doesNotMatch(widgets, /\$card\['description'\]/);
|
||||
assert.match(header, /empty\(\$card\['custom_icon'\]\)/);
|
||||
});
|
||||
|
||||
|
||||
@@ -28,6 +28,20 @@ test('reference slider CSS includes responsive height and combo selectors', () =
|
||||
for (const token of ['.new-swiper.slide-widget.scale-height', '--scale-height', '--pc-height', '--m-height', '.widget-slider-graphic', '.m-hide_slide', '.m-hide_cover', '--m-cover-ratio']) assert.match(css, new RegExp(token.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')));
|
||||
});
|
||||
|
||||
test('icon card widgets expose Zibll vertical and horizontal contracts', () => {
|
||||
const schemas = read('src/WidgetSystem/WidgetSchemas.php');
|
||||
const renderer = read('src/WidgetSystem/Renderers/GeneralRenderer.php');
|
||||
const helper = read('inc/helpers/aksrt-icon-cards.php');
|
||||
for (const token of ['show_widget_bg', "'id' => 'size'", 'icon_radius', 'icon_custom_color', "'id' => 'icon_radius4'", 'icon_background_palette', 'icon_text_palette']) {
|
||||
assert.match(schemas, new RegExp(token.replace(/[.*+?^${}()|[\\]\\]/g, '\\$&')));
|
||||
}
|
||||
for (const token of ['clearfix', 'row gutters-5', 'icon-card', 'icon-cover-card', 'icon-cover-icon', 'icon-cover-desc']) {
|
||||
assert.match(renderer + helper, new RegExp(token.replace(/[.*+?^${}()|[\\]\\]/g, '\\$&')));
|
||||
}
|
||||
assert.match(helper, /wp_kses_post\(\$title\)/);
|
||||
assert.match(helper, /wp_kses_post\(\$desc\)/);
|
||||
});
|
||||
|
||||
test('admin core supports composite dependencies and nested repeater renumbering', () => {
|
||||
const core = require(path.join(root, 'assets/widgets/admin-core.js'));
|
||||
assert.equal(core.dependencyVisible([['direction', '!=', 'vertical'], ['scale_height', '!=', '']], { direction: 'horizontal', scale_height: '1' }), true);
|
||||
|
||||
Reference in New Issue
Block a user