Skip to content

Commit 20aa5d7

Browse files
authored
Merge pull request #384 from adobe-commerce-tier-4/PR-12-05-2024
[Support Tier-4 chittima] 12-05-2024 Regular delivery of bugfixes and improvements
2 parents 7c27e93 + 235f470 commit 20aa5d7

File tree

3 files changed

+40
-4
lines changed

3 files changed

+40
-4
lines changed

app/code/Magento/PageBuilder/Model/Wysiwyg/DefaultConfigProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function getConfig(DataObject $config): DataObject
4545
$config->addData(
4646
[
4747
'tinymce' => [
48-
'toolbar' => 'undo redo | styles | fontfamily fontsize | lineheight | forecolor backcolor ' .
48+
'toolbar' => 'undo redo | styles | fontfamily fontsizeinput | lineheight | forecolor backcolor ' .
4949
'| bold italic underline | alignleft aligncenter alignright | numlist bullist ' .
5050
'| link image table charmap',
5151

app/code/Magento/PageBuilder/Test/Unit/Model/Wysiwyg/DefaultConfigProviderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ public function testGetConfig(): void
3737
$config = new DataObject();
3838
$configProvider = new DefaultConfigProvider($this->assetRepo, []);
3939
$result = $configProvider->getConfig($config);
40-
$this->assertStringContainsString('fontfamily fontsize', $result->getTinymce()['toolbar']);
40+
$this->assertStringContainsString('fontfamily fontsizeinput', $result->getTinymce()['toolbar']);
4141
}
4242
}

dev/tests/integration/testsuite/Magento/PageBuilder/CatalogWidget/Block/Product/ProductListTest.php

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php
22
/**
3-
* Copyright © Magento, Inc. All rights reserved.
4-
* See COPYING.txt for license details.
3+
* Copyright 2021 Adobe
4+
* All Rights Reserved.
55
*/
66
declare(strict_types=1);
77

@@ -10,7 +10,10 @@
1010
use Magento\Catalog\Api\Data\CategoryInterface;
1111
use Magento\CatalogWidget\Block\Product\ProductsList;
1212
use Magento\Store\Model\Store;
13+
use Magento\TestFramework\Fixture\AppArea;
14+
use Magento\TestFramework\Fixture\Config;
1315
use Magento\TestFramework\Helper\Bootstrap;
16+
use Magento\Widget\Model\Template\Filter;
1417
use PHPUnit\Framework\TestCase;
1518

1619
/**
@@ -291,4 +294,37 @@ public static function categoryFilterAndSortDataProvider(): array
291294
]
292295
];
293296
}
297+
298+
#[
299+
AppArea('frontend'),
300+
Config('dev/template/minify_html', 1, 'store', 'default')
301+
]
302+
public function testWidgetWithMinification()
303+
{
304+
/** @var Filter $filter */
305+
$filter = Bootstrap::getObjectManager()->create(
306+
Filter::class
307+
);
308+
$notExistedSku = uniqid();
309+
$construction = [
310+
0 => '{{widget type="Magento\CatalogWidget\Block\Product\ProductsList" ' .
311+
'template="Magento_PageBuilder::catalog/product/widget/content/carousel.phtml" anchor_text="" ' .
312+
'id_path="" show_pager="0" products_count="20" condition_option="sku" condition_option_value="' .
313+
$notExistedSku . '" ' .
314+
'type_name="Catalog Products Carousel" conditions_encoded="^[`1`:^[`aggregator`:`all`,`new_child`:``,' .
315+
'`type`:`Magento||CatalogWidget||Model||Rule||Condition||Combine`,`value`:`1`^],`1--1`:' .
316+
'^[`operator`:`()`,`type`:`Magento||CatalogWidget||Model||Rule||Condition||Product`,`attribute`:`sku`' .
317+
',`value`:`' . $notExistedSku . '`^]^]" sort_order="position_by_sku" store_id="0"}}',
318+
1 => 'widget',
319+
2 => 'type="Magento\CatalogWidget\Block\Product\ProductsList" ' .
320+
'template="Magento_PageBuilder::catalog/product/widget/content/carousel.phtml" anchor_text="" ' .
321+
'id_path="" show_pager="0" products_count="20" condition_option="sku" condition_option_value="' .
322+
$notExistedSku . '" ' .
323+
'type_name="Catalog Products Carousel" conditions_encoded="^[`1`:^[`aggregator`:`all`,`new_child`:``,' .
324+
'`type`:`Magento||CatalogWidget||Model||Rule||Condition||Combine`,`value`:`1`^],`1--1`:' .
325+
'^[`operator`:`()`,`type`:`Magento||CatalogWidget||Model||Rule||Condition||Product`,`attribute`:' .
326+
'`sku`,`value`:`' . $notExistedSku . '`^]^]" sort_order="position_by_sku" store_id="0"'
327+
];
328+
$this->assertEquals('', $filter->generateWidget($construction));
329+
}
294330
}

0 commit comments

Comments
 (0)