对小工具进行了一些修复
This commit is contained in:
1 parent
bb9413cba6
commit
411905f919
7 files changed
+128
-43
No files matched your search
@@ -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