Skip to content

Commit 28281a5

Browse files
committed
MC-2373: Update existing MFTF Tests
- Add description ID to new description wrapper, the tabs would add this ID automatically - Ensure defaults in layouts are updated when Page Builder is installed within test suite - Check for the new PB defaults
1 parent cab85b3 commit 28281a5

File tree

5 files changed

+61
-1
lines changed

5 files changed

+61
-1
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="RestoreLayoutSetting">
12+
<!-- Remove the existing layout update entries, as they can be merged in the wrong order -->
13+
<remove keyForRemoval="selectOneColumn"/>
14+
<remove keyForRemoval="selectNoLayoutUpdates1"/>
15+
<remove keyForRemoval="selectNoLayoutUpdates2"/>
16+
<!-- Set the defaults to those now set by Page Builder -->
17+
<selectOption selector="{{DefaultLayoutsSection.pageLayout}}" userInput="{{PageBuilderFullWidthLayout.cms}}" stepKey="selectCmsFullWidth" after="expandDefaultLayouts"/>
18+
<selectOption selector="{{DefaultLayoutsSection.categoryLayout}}" userInput="{{PageBuilderFullWidthLayout.category}}" stepKey="selectCategoryFullWidth" after="expandDefaultLayouts"/>
19+
<selectOption selector="{{DefaultLayoutsSection.productLayout}}" userInput="{{PageBuilderFullWidthLayout.product}}" stepKey="selectProductFullWidth" after="expandDefaultLayouts"/>
20+
</actionGroup>
21+
</actionGroups>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="PageBuilderFullWidthLayout" type="pagebuild_full_width_layout">
12+
<data key="cms">CMS - Full Width</data>
13+
<data key="category">Category - Full Width</data>
14+
<data key="product">Product - Full Width</data>
15+
</entity>
16+
</entities>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
11+
<test name="AdminConfigDefaultCategoryLayoutFromConfigurationSettingTest">
12+
<!-- PageBuilder is enabled so check default is full width -->
13+
<comment userInput="PageBuilder is enabled so check default is full width" stepKey="commentSeeCategoryFullWidth" before="seeNoLayoutUpdatesSelected" />
14+
<seeOptionIsSelected selector="{{DefaultLayoutsSection.categoryLayout}}" userInput="{{PageBuilderFullWidthLayout.category}}" stepKey="seeNoLayoutUpdatesSelected" />
15+
</test>
16+
</tests>

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,11 @@
1616
<actionGroup ref="enablePageBuilderSetting" stepKey="turnOnPageBuilder" before="amOnLogoutPage"/>
1717
</after>
1818
</test>
19+
<test name="AdminConfigDefaultCMSPageLayoutFromConfigurationSettingTest">
20+
<!-- PageBuilder is enabled so check default is full width -->
21+
<comment userInput="PageBuilder is enabled so check default is full width" stepKey="commentSeeFullWidth" />
22+
<seeOptionIsSelected selector="{{DefaultLayoutsSection.pageLayout}}" userInput="{{PageBuilderFullWidthLayout.cms}}" stepKey="seeOneColumnSelected" />
23+
<seeOptionIsSelected selector="{{DefaultLayoutsSection.productLayout}}" userInput="{{PageBuilderFullWidthLayout.product}}" stepKey="seeNoLayoutUpdatesSelected1" />
24+
<seeOptionIsSelected selector="{{DefaultLayoutsSection.categoryLayout}}" userInput="{{PageBuilderFullWidthLayout.category}}" stepKey="seeNoLayoutUpdatesSelected2" />
25+
</test>
1926
</tests>

app/code/Magento/PageBuilder/view/frontend/page_layout/product-full-width.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
</container>
1717
</container>
1818
<!-- Create wrapper for description without page-main class which adds gutters -->
19-
<container name="product.info.description.wrapper" after="main.content" before="product.info.details.wrapper" htmlTag="div" htmlClass="page-main-description"/>
19+
<container name="product.info.description.wrapper" after="main.content" before="product.info.details.wrapper" htmlTag="div" htmlClass="page-main-description" htmlId="description"/>
2020
</referenceContainer>
2121

2222
<!-- Move details & description into their new wrappers -->

0 commit comments

Comments
 (0)