Skip to content

Commit a68dfc1

Browse files
ENGCOM-8541: [MFTF] Refactoring of AdminConfigDefaultProductLayoutFromConfigurationSettingTest #30850
- Merge Pull Request #30850 from AnnaAPak/magento2:ref-AdminConfigDefaultProductLayoutFromConfigurationSettingTest - Merged commits: 1. c0728b8 2. 625a01a 3. 4772239 4. a4bf8b3 5. 283389b 6. b5151b8 7. 371e300 8. be757be 9. b8149af 10. 0b0f118
2 parents 516acb2 + 0b0f118 commit a68dfc1

File tree

3 files changed

+67
-12
lines changed

3 files changed

+67
-12
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminExpandProductDesignSectionActionGroup">
12+
<annotations>
13+
<description>Expand the Design section on the Product Details page in Admin.</description>
14+
</annotations>
15+
16+
<click selector="{{ProductDesignSection.DesignTab}}" stepKey="clickDesignTab"/>
17+
<waitForPageLoad stepKey="waitForTabOpen"/>
18+
</actionGroup>
19+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateSimpleProductTest/AdminConfigDefaultProductLayoutFromConfigurationSettingTest.xml

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
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"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
1010
<test name="AdminConfigDefaultProductLayoutFromConfigurationSettingTest">
1111
<annotations>
1212
<features value="Catalog"/>
@@ -21,18 +21,29 @@
2121
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
2222
</before>
2323
<after>
24-
<actionGroup ref="RestoreLayoutSetting" stepKey="sampleActionGroup"/>
24+
<actionGroup ref="NavigateToDefaultLayoutsSettingActionGroup" stepKey="navigateToWebConfigurationPage1"/>
25+
<actionGroup ref="AdminSetProductLayoutSettingsActionGroup" stepKey="sampleActionGroup">
26+
<argument name="layout" value="1 column"/>
27+
</actionGroup>
28+
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheBeforeTestFinishes">
29+
<argument name="tags" value="config"/>
30+
</actionGroup>
2531
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
2632
</after>
27-
<actionGroup ref="AdminOpenWebConfigurationPageActionGroup" stepKey="navigateToWebConfigurationPage"/>
28-
<conditionalClick stepKey="expandDefaultLayouts" selector="{{WebSection.DefaultLayoutsTab}}" dependentSelector="{{WebSection.CheckIfTabExpand}}" visible="true"/>
29-
<waitForElementVisible selector="{{DefaultLayoutsSection.productLayout}}" stepKey="DefaultProductLayout"/>
30-
<selectOption selector="{{DefaultLayoutsSection.productLayout}}" userInput="3 columns" stepKey="select3ColumnsLayout"/>
31-
<click selector="{{ContentManagementSection.Save}}" stepKey="clickSaveConfig"/>
32-
<amOnPage url="{{AdminProductCreatePage.url(AddToDefaultSet.attributeSetId, 'simple')}}" stepKey="navigateToNewProduct"/>
33-
<waitForPageLoad stepKey="wait1"/>
34-
<click selector="{{ProductDesignSection.DesignTab}}" stepKey="clickOnDesignTab"/>
35-
<waitForElementVisible selector="{{ProductDesignSection.LayoutDropdown}}" stepKey="waitForLayoutDropDown"/>
33+
34+
<actionGroup ref="NavigateToDefaultLayoutsSettingActionGroup" stepKey="navigateToWebConfigurationPage"/>
35+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="expandDefaultLayouts"/>
36+
<comment userInput="Comment is added to preserve the step key for backward compatibilityr" stepKey="DefaultProductLayout"/>
37+
<actionGroup ref="AdminSetProductLayoutSettingsActionGroup" stepKey="select3ColumnsLayout">
38+
<argument name="layout" value="3 columns"/>
39+
</actionGroup>
40+
<actionGroup ref="CliCacheFlushActionGroup" stepKey="clickSaveConfig">
41+
<argument name="tags" value="config"/>
42+
</actionGroup>
43+
<actionGroup ref="AdminOpenNewProductFormPageActionGroup" stepKey="navigateToNewProduct"/>
44+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="wait1"/>
45+
<actionGroup ref="AdminExpandProductDesignSectionActionGroup" stepKey="clickOnDesignTab"/>
46+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForLayoutDropDown"/>
3647
<seeOptionIsSelected selector="{{ProductDesignSection.LayoutDropdown}}" userInput="3 columns" stepKey="see3ColumnsSelected"/>
3748
</test>
3849
</tests>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminSetProductLayoutSettingsActionGroup">
12+
<annotations>
13+
<description>Sets the 'Default Product Layout' to requested value.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="layout" type="string"/>
17+
</arguments>
18+
19+
<waitForElementVisible selector="{{DefaultLayoutsSection.productLayout}}" stepKey="waittForDefaultProductLayout"/>
20+
<selectOption selector="{{DefaultLayoutsSection.productLayout}}" userInput="{{layout}}" stepKey="selectLayout"/>
21+
<click selector="{{ContentManagementSection.Save}}" stepKey="clickSaveConfig"/>
22+
<waitForPageLoad stepKey="waitForSavingSystemConfiguration"/>
23+
<see userInput="You saved the configuration." stepKey="seeSuccessMessage"/>
24+
</actionGroup>
25+
</actionGroups>

0 commit comments

Comments
 (0)