Skip to content

Commit c78e396

Browse files
committed
MAGETWO-92021: [Tech debt] Improving dev experience for Products content type
- Build stabilization
1 parent 2f73706 commit c78e396

File tree

3 files changed

+7
-62
lines changed

3 files changed

+7
-62
lines changed

app/code/Magento/PageBuilder/view/adminhtml/templates/form/element/conditions.phtml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
/** @var $block \Magento\PageBuilder\Block\Adminhtml\Form\Element\ProductConditions */
99
$attribute = $block->getData('attribute');
1010
$id = $block->getData('formNamespace') . '_' . $attribute;
11+
$role = 'pagebuilder-conditions-form-placeholder-' . $attribute;
1112
?>
1213
<label class="admin__field-label">
1314
<span><?= $block->escapeHtml($block->getData('label')) ?></span>
@@ -16,7 +17,7 @@ $id = $block->getData('formNamespace') . '_' . $attribute;
1617
<div class="rule-tree">
1718
<fieldset id="<?= $block->escapeHtmlAttr($id) ?>" class="fieldset">
1819
<div class="rule-tree-wrapper">
19-
<div data-role="pagebuilder-conditions-form-placeholder-<?= $block->escapeHtmlAttr($attribute) ?>"></div>
20+
<div data-role="<?= $block->escapeHtmlAttr($role) ?>"></div>
2021
</div>
2122
</fieldset>
2223
</div>

dev/tests/js/jasmine/tests/app/code/PageBuilder/view/adminhtml/web/js/content-type/products/mass-converter/widget-directive.test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ define([
2929
},
3030
result = model.toDom(data, config);
3131

32-
expect(result.myhtml).toBe('');
32+
expect(result.myhtml).toBe(undefined);
3333
});
3434
it('Should return an empty string when conditions_encoded is false', function () {
3535
var data = {
@@ -41,7 +41,7 @@ define([
4141
},
4242
result = model.toDom(data, config);
4343

44-
expect(result.myhtml).toBe('');
44+
expect(result.myhtml).toBe(undefined);
4545
});
4646
it('Should return an empty string when conditions_encoded is empty string', function () {
4747
var data = {
@@ -53,7 +53,7 @@ define([
5353
},
5454
result = model.toDom(data, config);
5555

56-
expect(result.myhtml).toBe('');
56+
expect(result.myhtml).toBe('undefined;
5757
});
5858
it('Should return an empty string when conditions_encoded is empty undefined', function () {
5959
var data = {
@@ -64,7 +64,7 @@ define([
6464
},
6565
result = model.toDom(data, config);
6666

67-
expect(result.myhtml).toBe('');
67+
expect(result.myhtml).toBe(undefined);
6868
});
6969
it('Should transform regular properties', function () {
7070
var data = {
@@ -118,7 +118,7 @@ define([
118118
attributes = {
119119
myhtml: '{{widget products_count="123"}}'
120120
},
121-
result = model.fromDom(attributes);
121+
result = model.fromDom(attributes, config);
122122

123123
expect(result.products_count).toBe(expected.products_count);
124124
expect(result.conditions_encoded).toBe(expected.conditions_encoded);

dev/tests/js/jasmine/tests/app/code/PageBuilder/view/adminhtml/web/js/mass-converter/widget-directive.test.js

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)