Skip to content

Commit d3b5073

Browse files
committed
#559: User Sees No Predefined Gutters
- Fixing Functional Tests (Tabs)
1 parent 4a14fd4 commit d3b5073

File tree

6 files changed

+45
-31
lines changed

6 files changed

+45
-31
lines changed

app/code/Magento/PageBuilder/Test/Mftf/ActionGroup/LayoutConfigurationActionGroup/ValidateContentTypeHeightEqualToMinHeightPlusPaddingAndBorderActionGroup.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55
* See COPYING.txt for license details.
66
*/
77
-->
8-
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9-
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
8+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
109
<actionGroup name="validateContentTypeHeightEqualToMinHeightPlusPaddingAndBorder">
1110
<annotations>
12-
<description>Validates that a content type's minimum height is equal to it's actual height minus top padding minus bottom padding minus border width times two.</description>
11+
<description>Validates that a content type's minimum height is equal to its actual height minus top padding, minus bottom padding, minus border width, doubled.</description>
1312
</annotations>
1413
<arguments>
1514
<argument name="content" type="string"/>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderBlockRenderLayoutContentTypesTest/BlockRenderTabsThroughBlockContentTypeTest.xml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
* See COPYING.txt for license details.
66
*/
77
-->
8-
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9-
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
8+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
109
<test name="BlockRenderTabsThroughBlockContentTypeTest">
1110
<annotations>
1211
<features value="PageBuilder"/>
@@ -57,6 +56,7 @@
5756
<actionGroup ref="addChildContentTypeFromOptionMenu" stepKey="addChildContentType">
5857
<argument name="contentType" value="PageBuilderTabsContentType"/>
5958
</actionGroup>
59+
6060
<!-- Edit Tab Group -->
6161
<comment userInput="Edit Tab Group" stepKey="commentEditTabs"/>
6262
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuTabs">
@@ -72,6 +72,7 @@
7272
<argument name="property" value="PageBuilderTabsAlignmentCenter"/>
7373
</actionGroup>
7474
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettingsTabs"/>
75+
7576
<!-- Edit Tab 1 -->
7677
<comment userInput="Edit Tab 1" stepKey="commentEditTab1"/>
7778
<actionGroup ref="openPageBuilderEditPanelSmallByIndex" stepKey="openEditPanelTab1">
@@ -109,7 +110,7 @@
109110
<argument name="property" value="PageBuilderTabVerticalAlignmentPropertyCenter"/>
110111
</actionGroup>
111112
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettingsTab1"/>
112-
<!-- Add Divider To Tab 1 -->
113+
<!-- Add Divider -->
113114
<comment userInput="Add Divider To Tab 1" stepKey="commentAddDividerToTab1"/>
114115
<actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandPanelDividerMenuSection">
115116
<argument name="contentType" value="PageBuilderDividerContentType"/>
@@ -119,6 +120,7 @@
119120
<argument name="containerTargetType" value="PageBuilderTabContentType"/>
120121
<argument name="containerTargetIndex" value="1"/>
121122
</actionGroup>
123+
122124
<!-- Edit Tab 2 -->
123125
<comment userInput="Edit Tab 2" stepKey="commentEditTab2"/>
124126
<actionGroup ref="openPageBuilderEditPanelSmallByIndex" stepKey="openEditPanelTab2">
@@ -135,6 +137,7 @@
135137
<actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreenBeforeSave"/>
136138
<actionGroup ref="SaveCMSBlockActionGroup" stepKey="saveCMSBlock"/>
137139
<actionGroup ref="AdminOpenPageBuilderFromContentPreviewOverlayActionGroup" stepKey="openPageBuilderFullScreen"/>
140+
138141
<!-- Validate CMS Block Stage -->
139142
<comment userInput="Validate CMS Block Stage" stepKey="commentValidateCMSBlockStage"/>
140143
<seeElement selector="{{TabOnStage.tabHeaderItemActive('2')}}" stepKey="seeTab2ActiveCMSBlockStage"/>
@@ -200,6 +203,7 @@
200203
<actionGroup ref="validateDividerWidthPercentage" stepKey="validateDividerWidthCMSBlockStage">
201204
<argument name="page" value="DividerOnStage"/>
202205
</actionGroup>
206+
203207
<!-- Add Block to CMS Page -->
204208
<comment userInput="Add Block to CMS Page" stepKey="commentAddBlockToCMSPage"/>
205209
<actionGroup ref="NavigateToCreatedCMSPageActionGroup" stepKey="navigateToCreatedCMSPage">
@@ -219,6 +223,7 @@
219223
<argument name="block" value="$$createCMSBlock$$"/>
220224
</actionGroup>
221225
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettingsBlock"/>
226+
222227
<!-- Validate CMS Page Stage -->
223228
<comment userInput="Validate CMS Page Stage" stepKey="commentValidateCMSPageStage"/>
224229
<seeElement selector="{{TabOnStorefront.tabHeaderItemActive('2')}}" stepKey="seeTab2ActiveCMSPageStage"/>
@@ -253,6 +258,7 @@
253258
</actionGroup>
254259
<actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreen"/>
255260
<actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPage"/>
261+
256262
<!-- Validate CMS Page Storefront -->
257263
<comment userInput="Validate CMS Page Storefront" stepKey="commentValidateCMSPageStorefront"/>
258264
<actionGroup ref="NavigateToStorefrontForCreatedPageActionGroup" stepKey="navigateToCMSPageStorefront">
@@ -329,6 +335,7 @@
329335
<actionGroup ref="validateDividerWidthPercentage" stepKey="validateDividerWidthCMSPageStorefront">
330336
<argument name="page" value="DividerOnStorefront"/>
331337
</actionGroup>
338+
332339
<!-- Validate CMS Page Storefront Mobile -->
333340
<comment userInput="Validate CMS Page Storefront Mobile" stepKey="commentValidateCMSPageStorefrontMobile"/>
334341
<resizeWindow width="767" height="1000" stepKey="resizeWindowToMobileCMSPageStorefrontMobile"/>
@@ -368,6 +375,7 @@
368375
<argument name="index" value="2"/>
369376
</actionGroup>
370377
<resizeWindow width="1280" height="1024" stepKey="resizeWindowToDesktop"/>
378+
371379
<!-- Change Default Tab -->
372380
<comment userInput="Change Default Tab" stepKey="commentChangeDefaultTab"/>
373381
<actionGroup ref="NavigateToCreatedCMSBlockPageActionGroup" stepKey="navigateToCreatedCMSBlockPage1">
@@ -392,6 +400,7 @@
392400
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettingsTabs2"/>
393401
<actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreen2"/>
394402
<actionGroup ref="SaveCMSBlockActionGroup" stepKey="saveCMSBlock2"/>
403+
395404
<!-- Validate CMS Page Stage Again -->
396405
<comment userInput="Validate CMS Page Stage Again" stepKey="commentValidateCMSPageStageAgain"/>
397406
<actionGroup ref="NavigateToCreatedCMSPageActionGroup" stepKey="navigateToCreatedCMSPage2">

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderTabGroupTest/TabsValidateAdvancedConfigurationDefaultValuesTest.xml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
* See COPYING.txt for license details.
66
*/
77
-->
8-
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9-
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
8+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
109
<test name="TabsValidateAdvancedConfigurationDefaultValuesTest">
1110
<annotations>
1211
<features value="PageBuilder"/>
@@ -31,6 +30,7 @@
3130
<actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle">
3231
<argument name="contentType" value="PageBuilderTabsContentType"/>
3332
</actionGroup>
33+
3434
<!-- Add Tabs to Stage -->
3535
<comment userInput="Add Tabs to Stage" stepKey="addTabsToStage"/>
3636
<actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandPageBuilderPanelMenuSection">
@@ -39,11 +39,13 @@
3939
<actionGroup ref="dragContentTypeToStage" stepKey="dragTabsIntoStage">
4040
<argument name="contentType" value="PageBuilderTabsContentType"/>
4141
</actionGroup>
42+
4243
<!-- Open Tabs Panel -->
4344
<click selector="{{TabsOnStage.tabsContainer}}" stepKey="focusTabsElement"/>
4445
<actionGroup ref="openPageBuilderEditPanel" stepKey="openEditMenuOnStage">
4546
<argument name="contentType" value="PageBuilderTabsContentType"/>
4647
</actionGroup>
48+
4749
<!-- Validate Default Values -->
4850
<comment userInput="Validate Default Values" stepKey="CommentValidateDefaultValues"/>
4951
<actionGroup ref="validateTextAlignment" stepKey="validateAlignment">
@@ -67,12 +69,15 @@
6769
<actualResult type="variable">getCssClasses</actualResult>
6870
</assertEmpty>
6971
<actionGroup ref="seeInMarginFieldsSlideOutPanel" stepKey="validateMargins">
70-
<argument name="property" value="PageBuilderMarginsPropertyDefault"/>
72+
<!-- @todo: Update `PageBuilderMarginsPropertyDefault` with (Default) Empty Values -->
73+
<argument name="property" value="PageBuilderMarginsProperty_Empty"/>
7174
</actionGroup>
7275
<actionGroup ref="seeInPaddingFieldsSlideOutPanel" stepKey="validatePadding">
73-
<argument name="property" value="PageBuilderPaddingPropertyDefault"/>
76+
<!-- @todo: Update `PageBuilderPaddingPropertyDefault` with (Default) Empty Values -->
77+
<argument name="property" value="PageBuilderPaddingProperty_Empty"/>
7478
</actionGroup>
7579
<actionGroup ref="saveEditPanelSettings" stepKey="saveEditPanelSettings"/>
80+
7681
<!-- Validate Style On Stage -->
7782
<comment userInput="Validate Style On Stage" stepKey="CommentValidateStage"/>
7883
<actionGroup ref="ValidateContentTypesStyleEqualsExpectedStyleActionGroup" stepKey="waitForDefaultBorderStyleTab">

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderTabItemConfigurationTest/DefaultTabItemStateOnAddingNewTabTest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
* See COPYING.txt for license details.
66
*/
77
-->
8-
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9-
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
8+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
109
<test name="DefaultTabItemStateOnAddingNewTabTest">
1110
<annotations>
1211
<features value="PageBuilder"/>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderTabItemConfigurationTest/TabItemValidateAdvancedConfigurationDefaultValuesTest.xml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
* See COPYING.txt for license details.
66
*/
77
-->
8-
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9-
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
8+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
109
<test name="TabItemValidateAdvancedConfigurationDefaultValuesTest">
1110
<annotations>
1211
<features value="PageBuilder"/>
@@ -30,7 +29,7 @@
3029
<actionGroup ref="addPageBuilderPageTitle" stepKey="enterPageTitle">
3130
<argument name="contentType" value="PageBuilderTabsContentType"/>
3231
</actionGroup>
33-
<!--Add Tabs to Stage -->
32+
<!-- Add Tabs to Stage -->
3433
<actionGroup ref="expandPageBuilderPanelMenuSection" stepKey="expandPageBuilderPanelMenuSection">
3534
<argument name="contentType" value="PageBuilderTabsContentType"/>
3635
</actionGroup>
@@ -138,48 +137,49 @@
138137
<actionGroup ref="validateSlideOutPanelFieldIsNotRequired" stepKey="validateMarginsAndPaddingAttributeNotRequired">
139138
<argument name="property" value="PageBuilderAdvancedMarginsAndPaddingDefaultProperty"/>
140139
</actionGroup>
141-
<!-- Assert against values -->
142-
<comment userInput="Margins: defaults to 0" stepKey="AC9"/>
143-
<comment userInput="Padding: defaults to 40 all sides" stepKey="AC10"/>
140+
141+
<!-- Assert Values -->
142+
<comment userInput="Margins: Defaults to Empty" stepKey="AC9"/>
143+
<comment userInput="Padding: Defaults to Empty" stepKey="AC10"/>
144144
<grabValueFrom selector="{{AdvancedForm.advancedMarginTop}}" stepKey="getTextMarginTop"/>
145145
<assertEquals message="Verify Text Alignment dropdown options" stepKey="assertTextMarginTop">
146146
<actualResult type="variable">getTextMarginTop</actualResult>
147-
<expectedResult type="string">{{PageBuilderAdvancedMarginsAndPaddingPropertyDefaultSlide.marginTop}}</expectedResult>
147+
<expectedResult type="string">{{PageBuilderMarginsProperty_Empty.marginTop}}</expectedResult>
148148
</assertEquals>
149149
<grabValueFrom selector="{{AdvancedForm.advancedMarginRight}}" stepKey="getTextMarginRight"/>
150150
<assertEquals message="Verify Text Alignment dropdown options" stepKey="assertTextMarginRight">
151151
<actualResult type="variable">getTextMarginRight</actualResult>
152-
<expectedResult type="string">{{PageBuilderAdvancedMarginsAndPaddingPropertyDefaultSlide.marginRight}}</expectedResult>
152+
<expectedResult type="string">{{PageBuilderMarginsProperty_Empty.marginRight}}</expectedResult>
153153
</assertEquals>
154154
<grabValueFrom selector="{{AdvancedForm.advancedMarginLeft}}" stepKey="getTextMarginLeft"/>
155155
<assertEquals message="Verify Text Alignment dropdown options" stepKey="assertTextMarginLeft">
156156
<actualResult type="variable">getTextMarginLeft</actualResult>
157-
<expectedResult type="string">{{PageBuilderAdvancedMarginsAndPaddingPropertyDefaultSlide.marginLeft}}</expectedResult>
157+
<expectedResult type="string">{{PageBuilderMarginsProperty_Empty.marginLeft}}</expectedResult>
158158
</assertEquals>
159159
<grabValueFrom selector="{{AdvancedForm.advancedMarginBottom}}" stepKey="getTextMarginBottom"/>
160160
<assertEquals message="Verify Text Alignment dropdown options" stepKey="assertTextMarginBottom">
161161
<actualResult type="variable">getTextMarginBottom</actualResult>
162-
<expectedResult type="string">{{PageBuilderAdvancedMarginsAndPaddingPropertyDefaultSlide.marginBottom}}</expectedResult>
162+
<expectedResult type="string">{{PageBuilderMarginsProperty_Empty.marginBottom}}</expectedResult>
163163
</assertEquals>
164164
<grabValueFrom selector="{{AdvancedForm.advancedPaddingTop}}" stepKey="getTextPaddingTop"/>
165165
<assertEquals message="Verify Text Alignment dropdown options" stepKey="assertTextPaddingTop">
166166
<actualResult type="variable">getTextPaddingTop</actualResult>
167-
<expectedResult type="string">{{PageBuilderAdvancedMarginsAndPaddingPropertyDefaultSlide.paddingTop}}</expectedResult>
167+
<expectedResult type="string">{{PageBuilderPaddingProperty_Empty.paddingTop}}</expectedResult>
168168
</assertEquals>
169169
<grabValueFrom selector="{{AdvancedForm.advancedPaddingRight}}" stepKey="getTextPaddingRight"/>
170170
<assertEquals message="Verify Text Alignment dropdown options" stepKey="assertTextPaddingRight">
171171
<actualResult type="variable">getTextPaddingRight</actualResult>
172-
<expectedResult type="string">{{PageBuilderAdvancedMarginsAndPaddingPropertyDefaultSlide.paddingRight}}</expectedResult>
172+
<expectedResult type="string">{{PageBuilderPaddingProperty_Empty.paddingRight}}</expectedResult>
173173
</assertEquals>
174174
<grabValueFrom selector="{{AdvancedForm.advancedPaddingLeft}}" stepKey="getTextPaddingLeft"/>
175175
<assertEquals message="Verify Text Alignment dropdown options" stepKey="assertTextPaddingLeft">
176176
<actualResult type="variable">getTextPaddingLeft</actualResult>
177-
<expectedResult type="string">{{PageBuilderAdvancedMarginsAndPaddingPropertyDefaultSlide.paddingLeft}}</expectedResult>
177+
<expectedResult type="string">{{PageBuilderPaddingProperty_Empty.paddingLeft}}</expectedResult>
178178
</assertEquals>
179179
<grabValueFrom selector="{{AdvancedForm.advancedPaddingBottom}}" stepKey="getTextPaddingBottom"/>
180180
<assertEquals message="Verify Text Alignment dropdown options" stepKey="assertTextPaddingBottom">
181181
<actualResult type="variable">getTextPaddingBottom</actualResult>
182-
<expectedResult type="string">{{PageBuilderAdvancedMarginsAndPaddingPropertyDefaultSlide.paddingBottom}}</expectedResult>
182+
<expectedResult type="string">{{PageBuilderPaddingProperty_Empty.paddingBottom}}</expectedResult>
183183
</assertEquals>
184184
</test>
185185
</tests>

app/code/Magento/PageBuilder/Test/Mftf/Test/AdminPageBuilderTabItemContentTest/TabMaintainsDefaultMinimumHeightWithContentTest.xml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
* See COPYING.txt for license details.
66
*/
77
-->
8-
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9-
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
8+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
109
<test name="TabMaintainsDefaultMinimumHeightWithContentTest">
1110
<annotations>
1211
<features value="PageBuilder"/>
@@ -60,17 +59,20 @@
6059
<argument name="containerTargetType" value="PageBuilderTabContentType"/>
6160
<argument name="containerTargetIndex" value="1"/>
6261
</actionGroup>
63-
<!-- Verify Tab height on stage -->
62+
63+
<!-- Verify on Stage -->
6464
<comment userInput="Verify Tab height on stage" stepKey="verifyTabOnStage"/>
65+
<!-- @todo: Use `{{PageBuilderTabMinimumHeightDefaultProperty.value}}` as `expectedResult` -->
66+
<executeJS function="return {{PageBuilderTabMinimumHeightDefaultProperty.value}}" stepKey="tabExpectedHeight"/>
6567
<executeJS function="return {{TabOnStage.tabContentHeightJS('0')}}" stepKey="tabContentHeightStage"/>
66-
<executeJS function="return {{PageBuilderTabMinimumHeightDefaultProperty.value}} + {{PageBuilderPaddingProperty40.paddingTop}} + {{PageBuilderPaddingProperty40.paddingBottom}}" stepKey="tabExpectedHeight"/>
6768
<assertEquals stepKey="assertTabHeightStage">
6869
<expectedResult type="variable">tabExpectedHeight</expectedResult>
6970
<actualResult type="variable">tabContentHeightStage</actualResult>
7071
</assertEquals>
7172
<actionGroup ref="exitPageBuilderFullScreen" stepKey="exitPageBuilderFullScreen"/>
7273
<actionGroup ref="SaveAndContinueEditCmsPageActionGroup" stepKey="saveAndContinueEditCmsPage"/>
73-
<!-- Verify Tab height on storefront -->
74+
75+
<!-- Verify on Storefront -->
7476
<comment userInput="Verify Tab height on storefront" stepKey="viewTabOnStorefront"/>
7577
<actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront">
7678
<argument name="contentType" value="PageBuilderTabsContentType"/>

0 commit comments

Comments
 (0)