Skip to content

Commit 0a97d41

Browse files
committed
MC-5079: Add Box Sizing to Storefront Styles (Border & Height Storefront Issues)
- add new test to assert column with borders and padding is equal to min height - add new column css selectors
1 parent aa7df53 commit 0a97d41

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

app/code/Magento/PageBuilder/Test/Mftf/Section/PageBuilderColumnSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
<section name="ColumnOnBackend">
1212
<element name="base" type="button" selector="(//div[contains(@class,'pagebuilder-column') and contains(@class,'pagebuilder-content-type')])[{{arg1}}]" parameterized="true"/>
1313
<element name="baseJS" type="text" selector="document.querySelectorAll('[data-role=column]')[{{arg1}} - 1]" parameterized="true"/>
14+
<element name="baseCSS" type="text" selector="div.pagebuilder-content-type.pagebuilder-column"/>
1415
<element name="allColumns" type="text" selector="//div[contains(@class, 'pagebuilder-content-type') and contains(@class, 'pagebuilder-column')]"/>
1516
<element name="default" type="button" selector="(//div[contains(@class,'pagebuilder-content-type') and contains(@class,'pagebuilder-column')])[{{arg1}}][@style='border: {{arg2}}; border-radius: {{arg3}}px; margin: {{arg4}}px; padding: {{arg5}}px; width: {{arg6}}; background-size: {{arg7}}; background-repeat: {{arg8}}; background-attachment: {{arg9}}; align-self: {{arg10}};']" parameterized="true"/>
1617
<element name="empty" type="button" selector="(//div[contains(@class,'empty-container')]//div[contains(@class,'element-children') and contains(@class,'column-container')])[{{arg1}}]" parameterized="true"/>
@@ -52,6 +53,7 @@
5253
<section name="ColumnOnFrontend">
5354
<element name="base" type="block" selector="(//div[@data-role='column'])[{{arg1}}]" parameterized="true"/>
5455
<element name="baseJS" type="text" selector="document.querySelectorAll('[data-role=column]')[{{arg1}} - 1]" parameterized="true"/>
56+
<element name="baseCSS" type="text" selector="[data-role=column]"/>
5557
<element name="columnGroup" type="block" selector=".pagebuilder-column-group"/>
5658
<element name="allColumns" type="block" selector="(//div[@data-role='column'])"/>
5759
<element name="columnX" type="block" selector="[data-role=column]:nth-child({{arg1}})" parameterized="true"/>

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

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,45 @@
177177
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/>
178178
<waitForElementVisible selector="{{ColumnOnBackend.base('1')}}" stepKey="waitForColumnOnStage" />
179179
</test>
180+
<test name="ColumnWithBordersAndPaddingEqualToMinHeight" extends="RowWithBordersAndPaddingEqualToMinHeight">
181+
<annotations>
182+
<features value="PageBuilder"/>
183+
<stories value="Column"/>
184+
<title value="Column height is equal to minimum height"/>
185+
<description value="A user can see Column height with borders and padding is equal to min height"/>
186+
<severity value="CRITICAL"/>
187+
<useCaseId value="MC-5079"/>
188+
<testCaseId value="MC-5771"/>
189+
<group value="pagebuilder"/>
190+
<group value="pagebuilder-column"/>
191+
</annotations>
192+
<actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle">
193+
<argument name="contentType" value="PageBuilderColumnContentType"/>
194+
</actionGroup>
195+
<actionGroup ref="dragContentTypeToStage" after="commentConfigureContentType" stepKey="dragContentTypeToStage">
196+
<argument name="contentType" value="PageBuilderColumnContentType"/>
197+
</actionGroup>
198+
<actionGroup ref="openPageBuilderEditPanelByIndex" stepKey="openEditPanel">
199+
<argument name="contentType" value="PageBuilderColumnContentType"/>
200+
<argument name="contentTypeIndex" value="1"/>
201+
</actionGroup>
202+
<actionGroup ref="validateContentTypeHeightEqualToMinHeight" stepKey="validateContentTypeHeightBeforeSave">
203+
<argument name="content" value="{{ColumnOnBackend.baseCSS}}"/>
204+
<argument name="border" value="PageBuilderAdvancedBorderWidthProperty10"/>
205+
<argument name="padding" value="PageBuilderPaddingProperty10"/>
206+
</actionGroup>
207+
<actionGroup ref="validateContentTypeHeightEqualToMinHeight" stepKey="validateContentTypeHeightAfterSave">
208+
<argument name="content" value="{{ColumnOnBackend.baseCSS}}"/>
209+
<argument name="border" value="PageBuilderAdvancedBorderWidthProperty10"/>
210+
<argument name="padding" value="PageBuilderPaddingProperty10"/>
211+
</actionGroup>
212+
<actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront">
213+
<argument name="contentType" value="PageBuilderColumnContentType"/>
214+
</actionGroup>
215+
<actionGroup ref="validateContentTypeHeightEqualToMinHeight" stepKey="validateContentTypeHeightStorefront">
216+
<argument name="content" value="{{ColumnOnFrontend.baseCSS}}"/>
217+
</actionGroup>
218+
</test>
180219
<test name="ColumnConfigurationHasVerticalAlignment">
181220
<annotations>
182221
<features value="PageBuilder"/>

0 commit comments

Comments
 (0)