Skip to content

Commit ca56a9b

Browse files
PB-277: Full height Row
- fix tests - update validation error message - update min-height notice message
1 parent dbfb3dc commit ca56a9b

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

app/code/Magento/PageBuilder/Test/Mftf/Data/CommonContentTypeData.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,15 +69,14 @@
6969
<data key="section">appearance_fieldset</data>
7070
<data key="fieldName">min_height</data>
7171
<data key="value">a</data>
72-
<data key="errorMessage">Please enter a valid number in this field.</data>
73-
<!-- TODO: update message-->
72+
<data key="errorMessage">Please enter a valid number or calculation: Valid numbers must have an extension (px, %, pt, vh). Calculations must have white space around the + and - operators and cannot divide by zero.</data>
7473
</entity>
7574
<entity name="PageBuilderMinHeightProperty_Negative1" type="pagebuilder_min_height_property">
7675
<data key="name">Minimum Height</data>
7776
<data key="section">appearance_fieldset</data>
7877
<data key="fieldName">min_height</data>
7978
<data key="value">-1</data>
80-
<data key="errorMessage">Please enter a value greater than or equal to 0.</data>
79+
<data key="errorMessage">Please enter a valid number or calculation: Valid numbers must have an extension (px, %, pt, vh). Calculations must have white space around the + and - operators and cannot divide by zero.</data>
8180
</entity>
8281
<!-- Vertical Alignment -->
8382
<entity name="PageBuilderVerticalAlignmentPropertyTop" type="pagebuilder_vertical_alignment_property">

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderRowLayoutTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@
137137
<!-- Enter Height: Valid After Invalid -->
138138
<comment userInput="Enter Height: Valid After Invalid" stepKey="commentEnterHeightValidAfterInvalid"/>
139139
<actionGroup ref="fillSlideOutPanelFieldGeneral" stepKey="enterMinHeightPropertyFirstRow">
140-
<argument name="property" value="PageBuilderMinHeightProperty_500"/>
140+
<argument name="property" value="PageBuilderMinHeightProperty_500px"/>
141141
</actionGroup>
142142
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettingsFirstRow"/>
143143
<!-- Verify Valid Height After Invalid - Before Save -->

app/code/Magento/PageBuilder/view/adminhtml/ui_component/pagebuilder_row_form.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
<field name="min_height" sortOrder="20" formElement="input">
7373
<settings>
7474
<label translate="true">Minimum Height</label>
75+
<notice translate="true">Minimum height can be a single number with any valid CSS unit (50px, 50%, 50em, 50vh) or a calculation (50% + 50px).</notice>
7576
<additionalClasses>
7677
<class name="admin__field-medium">true</class>
7778
</additionalClasses>

app/code/Magento/PageBuilder/view/adminhtml/web/js/form/element/validator-rules-mixin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ define([
233233
function (value) {
234234
return validateCalc(value);
235235
},
236-
$.mage.__('Please enter a valid value or expression: the + and - operators must be surrounded by whitespace; unexpected division by zero; single value should have extension.')//eslint-disable-line max-len
236+
$.mage.__('Please enter a valid number or calculation: Valid numbers must have an extension (px, %, pt, vh). Calculations must have white space around the + and - operators and cannot divide by zero.')//eslint-disable-line max-len
237237
);
238238

239239
validateObjectField(validator, 'validate-number');

0 commit comments

Comments
 (0)