Skip to content

Commit cc1f96d

Browse files
committed
MC-2365: Create MFTF tests for vertical alignment of rows
- move vertical alignment styles to common area - update existing tests
1 parent 26a71fb commit cc1f96d

File tree

3 files changed

+24
-21
lines changed

3 files changed

+24
-21
lines changed

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,6 @@
152152
<data key="minHeight300">min-height: 300px</data>
153153
<data key="padding">padding: 5px</data>
154154
<data key="textAlignment">text-align: center</data>
155-
<data key="verticalAlignmentBottom">justify-content: flex-end</data>
156-
<data key="verticalAlignmentCenter">justify-content: center</data>
157-
<data key="verticalAlignmentTop">justify-content: flex-start</data>
158155
<data key="widthOneTwelfth">width: 8.33333%</data>
159156
<data key="widthOneSixth">width: 16.6667%</data>
160157
<data key="widthOneThird">width: 33.3333%</data>

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,4 +55,10 @@
5555
<data key="value">flex-end</data>
5656
<data key="optionsList">[Top, Center, Bottom]</data>
5757
</entity>
58+
<!-- Styles -->
59+
<entity name="PageBuilderCommonStyles" type="pagebuilder_common_styles">
60+
<data key="verticalAlignmentBottom">justify-content: flex-end</data>
61+
<data key="verticalAlignmentCenter">justify-content: center</data>
62+
<data key="verticalAlignmentTop">justify-content: flex-start</data>
63+
</entity>
5864
</entities>

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

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -289,23 +289,23 @@
289289
</actionGroup>
290290
<!-- Verify Vertical Alignment On Stage - Before Save -->
291291
<comment userInput="Verify vertical alignment on stage before save" stepKey="commentVerifyVerticalAlignmentOnStageBeforeSave"/>
292-
<seeElement selector="{{PageBuilderColumnSection.columnChildrenStyle('1', '1', PageBuilderColumnStyles.verticalAlignmentTop)}}" stepKey="seeFirstColumnVerticalAlignmentTop"/>
293-
<seeElement selector="{{PageBuilderColumnSection.columnChildrenStyle('1', '2', PageBuilderColumnStyles.verticalAlignmentCenter)}}" stepKey="seeFirstColumnVerticalAlignmentCenter"/>
294-
<seeElement selector="{{PageBuilderColumnSection.columnChildrenStyle('1', '3', PageBuilderColumnStyles.verticalAlignmentBottom)}}" stepKey="seeFirstColumnVerticalAlignmentBottom"/>
292+
<seeElement selector="{{PageBuilderColumnSection.columnChildrenStyle('1', '1', PageBuilderCommonStyles.verticalAlignmentTop)}}" stepKey="seeFirstColumnVerticalAlignmentTop"/>
293+
<seeElement selector="{{PageBuilderColumnSection.columnChildrenStyle('1', '2', PageBuilderCommonStyles.verticalAlignmentCenter)}}" stepKey="seeFirstColumnVerticalAlignmentCenter"/>
294+
<seeElement selector="{{PageBuilderColumnSection.columnChildrenStyle('1', '3', PageBuilderCommonStyles.verticalAlignmentBottom)}}" stepKey="seeFirstColumnVerticalAlignmentBottom"/>
295295
<!-- Verify Vertical Alignment On Stage - After Save -->
296296
<comment userInput="Verify vertical alignment on stage after save" stepKey="commentVerifyVerticalAlignmentOnStageAfterSave"/>
297297
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
298298
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
299-
<seeElement selector="{{PageBuilderColumnSection.columnChildrenStyle('1', '1', PageBuilderColumnStyles.verticalAlignmentTop)}}" stepKey="seeFirstColumnVerticalAlignmentTopAfterSave"/>
300-
<seeElement selector="{{PageBuilderColumnSection.columnChildrenStyle('1', '2', PageBuilderColumnStyles.verticalAlignmentCenter)}}" stepKey="seeFirstColumnVerticalAlignmentCenterAfterSave"/>
301-
<seeElement selector="{{PageBuilderColumnSection.columnChildrenStyle('1', '3', PageBuilderColumnStyles.verticalAlignmentBottom)}}" stepKey="seeFirstColumnVerticalAlignmentBottomAfterSave"/>
299+
<seeElement selector="{{PageBuilderColumnSection.columnChildrenStyle('1', '1', PageBuilderCommonStyles.verticalAlignmentTop)}}" stepKey="seeFirstColumnVerticalAlignmentTopAfterSave"/>
300+
<seeElement selector="{{PageBuilderColumnSection.columnChildrenStyle('1', '2', PageBuilderCommonStyles.verticalAlignmentCenter)}}" stepKey="seeFirstColumnVerticalAlignmentCenterAfterSave"/>
301+
<seeElement selector="{{PageBuilderColumnSection.columnChildrenStyle('1', '3', PageBuilderCommonStyles.verticalAlignmentBottom)}}" stepKey="seeFirstColumnVerticalAlignmentBottomAfterSave"/>
302302
<!-- Verify Vertical Alignment In Storefront -->
303303
<actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront">
304304
<argument name="contentType" value="PageBuilderColumnContentType"/>
305305
</actionGroup>
306-
<seeElement selector="{{ColumnsOnFrontend.columnStyle('1', PageBuilderColumnStyles.verticalAlignmentTop)}}" stepKey="seeColumn1VerticalAlignmentTopApplied"/>
307-
<seeElement selector="{{ColumnsOnFrontend.columnStyle('2', PageBuilderColumnStyles.verticalAlignmentCenter)}}" stepKey="seeColumn2VerticalAlignmentCenterApplied"/>
308-
<seeElement selector="{{ColumnsOnFrontend.columnStyle('3', PageBuilderColumnStyles.verticalAlignmentBottom)}}" stepKey="seeColumn2VerticalAlignmentBottomApplied"/>
306+
<seeElement selector="{{ColumnsOnFrontend.columnStyle('1', PageBuilderCommonStyles.verticalAlignmentTop)}}" stepKey="seeColumn1VerticalAlignmentTopApplied"/>
307+
<seeElement selector="{{ColumnsOnFrontend.columnStyle('2', PageBuilderCommonStyles.verticalAlignmentCenter)}}" stepKey="seeColumn2VerticalAlignmentCenterApplied"/>
308+
<seeElement selector="{{ColumnsOnFrontend.columnStyle('3', PageBuilderCommonStyles.verticalAlignmentBottom)}}" stepKey="seeColumn2VerticalAlignmentBottomApplied"/>
309309
</test>
310310
<test name="ColumnContentIsVerticallyAlignedWithAppearanceAndDifferentMinimumHeights">
311311
<annotations>
@@ -410,24 +410,24 @@
410410
</actionGroup>
411411
<!-- Verify Vertical Alignment On Stage - Before Save -->
412412
<comment userInput="Verify vertical alignment on stage before save" stepKey="commentVerifyVerticalAlignmentOnStageBeforeSave"/>
413-
<seeElement selector="{{PageBuilderColumnSection.columnChildrenStyle('1', '1', PageBuilderColumnStyles.verticalAlignmentTop)}}" stepKey="seeFirstColumnVerticalAlignmentTop"/>
414-
<seeElement selector="{{PageBuilderColumnSection.columnChildrenStyle('1', '2', PageBuilderColumnStyles.verticalAlignmentCenter)}}" stepKey="seeFirstColumnVerticalAlignmentCenter"/>
415-
<seeElement selector="{{PageBuilderColumnSection.columnChildrenStyle('1', '3', PageBuilderColumnStyles.verticalAlignmentBottom)}}" stepKey="seeFirstColumnVerticalAlignmentBottom"/>
413+
<seeElement selector="{{PageBuilderColumnSection.columnChildrenStyle('1', '1', PageBuilderCommonStyles.verticalAlignmentTop)}}" stepKey="seeFirstColumnVerticalAlignmentTop"/>
414+
<seeElement selector="{{PageBuilderColumnSection.columnChildrenStyle('1', '2', PageBuilderCommonStyles.verticalAlignmentCenter)}}" stepKey="seeFirstColumnVerticalAlignmentCenter"/>
415+
<seeElement selector="{{PageBuilderColumnSection.columnChildrenStyle('1', '3', PageBuilderCommonStyles.verticalAlignmentBottom)}}" stepKey="seeFirstColumnVerticalAlignmentBottom"/>
416416
<!-- Verify Vertical Alignment On Stage - After Save -->
417417
<comment userInput="Verify vertical alignment on stage after save" stepKey="commentVerifyVerticalAlignmentOnStageAfterSave"/>
418418
<actionGroup ref="saveAndContinueEditCmsPage" stepKey="saveAndContinueEditCmsPage"/>
419419
<actionGroup ref="switchToPageBuilderStage" stepKey="switchToPageBuilderStage"/>
420-
<seeElement selector="{{PageBuilderColumnSection.columnChildrenStyle('1', '1', PageBuilderColumnStyles.verticalAlignmentTop)}}" stepKey="seeFirstColumnVerticalAlignmentTopAfterSave"/>
421-
<seeElement selector="{{PageBuilderColumnSection.columnChildrenStyle('1', '2', PageBuilderColumnStyles.verticalAlignmentCenter)}}" stepKey="seeFirstColumnVerticalAlignmentCenterAfterSave"/>
422-
<seeElement selector="{{PageBuilderColumnSection.columnChildrenStyle('1', '3', PageBuilderColumnStyles.verticalAlignmentBottom)}}" stepKey="seeFirstColumnVerticalAlignmentBottomAfterSave"/>
420+
<seeElement selector="{{PageBuilderColumnSection.columnChildrenStyle('1', '1', PageBuilderCommonStyles.verticalAlignmentTop)}}" stepKey="seeFirstColumnVerticalAlignmentTopAfterSave"/>
421+
<seeElement selector="{{PageBuilderColumnSection.columnChildrenStyle('1', '2', PageBuilderCommonStyles.verticalAlignmentCenter)}}" stepKey="seeFirstColumnVerticalAlignmentCenterAfterSave"/>
422+
<seeElement selector="{{PageBuilderColumnSection.columnChildrenStyle('1', '3', PageBuilderCommonStyles.verticalAlignmentBottom)}}" stepKey="seeFirstColumnVerticalAlignmentBottomAfterSave"/>
423423
<!-- Verify Vertical Alignment In Storefront -->
424424
<comment userInput="Verify vertical alignment in storefront" stepKey="commentVerifyVerticalAlignmentInStorefront"/>
425425
<actionGroup ref="navigateToStoreFront" stepKey="navigateToStoreFront">
426426
<argument name="contentType" value="PageBuilderColumnContentType"/>
427427
</actionGroup>
428-
<seeElement selector="{{ColumnsOnFrontend.columnStyle('1', PageBuilderColumnStyles.verticalAlignmentTop)}}" stepKey="seeColumn1VerticalAlignmentTopApplied"/>
429-
<seeElement selector="{{ColumnsOnFrontend.columnStyle('2', PageBuilderColumnStyles.verticalAlignmentCenter)}}" stepKey="seeColumn2VerticalAlignmentCenterApplied"/>
430-
<seeElement selector="{{ColumnsOnFrontend.columnStyle('3', PageBuilderColumnStyles.verticalAlignmentBottom)}}" stepKey="seeColumn2VerticalAlignmentBottomApplied"/>
428+
<seeElement selector="{{ColumnsOnFrontend.columnStyle('1', PageBuilderCommonStyles.verticalAlignmentTop)}}" stepKey="seeColumn1VerticalAlignmentTopApplied"/>
429+
<seeElement selector="{{ColumnsOnFrontend.columnStyle('2', PageBuilderCommonStyles.verticalAlignmentCenter)}}" stepKey="seeColumn2VerticalAlignmentCenterApplied"/>
430+
<seeElement selector="{{ColumnsOnFrontend.columnStyle('3', PageBuilderCommonStyles.verticalAlignmentBottom)}}" stepKey="seeColumn2VerticalAlignmentBottomApplied"/>
431431
</test>
432432
<test name="ColumnPlaceholderInAdminPreview">
433433
<annotations>

0 commit comments

Comments
 (0)