Skip to content

Commit 55b0fc2

Browse files
committed
updated tests with new ActionGroup
1 parent cbc884d commit 55b0fc2

6 files changed

+34
-23
lines changed

app/code/Magento/Bundle/Test/Mftf/Test/AdminAttributeSetSelectionTest.xml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,13 @@
4242
<!-- Switch from default attribute set to new attribute set -->
4343
<amOnPage url="{{AdminProductCreatePage.url('4', 'bundle')}}" stepKey="goToNewProductPage"/>
4444
<waitForPageLoad stepKey="wait2"/>
45-
<click selector="{{AdminProductFormSection.attributeSet}}" stepKey="startEditAttrSet"/>
46-
<fillField selector="{{AdminProductFormSection.attributeSetFilter}}" userInput="{{ProductAttributeFrontendLabel.label}}" stepKey="searchForAttrSet"/>
47-
<click selector="{{AdminProductFormSection.attributeSetFilterResult}}" stepKey="selectAttrSet"/>
45+
46+
<actionGroup ref="AdminSelectAttributeSetOnEditProductPageActionGroup" stepKey="startEditAttrSet">
47+
<argument name="attributeSet" value="{{ProductAttributeFrontendLabel.label}}"/>
48+
</actionGroup>
49+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="searchForAttrSet"/>
50+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectAttrSet"/>
51+
4852
<fillField selector="{{AdminProductFormBundleSection.productName}}" userInput="{{BundleProduct.name}}" stepKey="fillProductName"/>
4953
<fillField selector="{{AdminProductFormBundleSection.productSku}}" userInput="{{BundleProduct.sku}}" stepKey="fillProductSku"/>
5054

@@ -64,9 +68,11 @@
6468
<click selector="{{AdminProductFiltersSection.attributeSetOfFirstRow(ProductAttributeFrontendLabel.label)}}" stepKey="clickAttributeSet2"/>
6569
<waitForPageLoad stepKey="waitForPageLoad2"/>
6670

67-
<click selector="{{AdminProductFormSection.attributeSet}}" stepKey="startEditAttrSet2"/>
68-
<fillField selector="{{AdminProductFormSection.attributeSetFilter}}" userInput="{{BundleProduct.defaultAttribute}}" stepKey="searchForAttrSet2"/>
69-
<click selector="{{AdminProductFormSection.attributeSetFilterResult}}" stepKey="selectAttrSet2"/>
71+
<actionGroup ref="AdminSelectAttributeSetOnEditProductPageActionGroup" stepKey="startEditAttrSet2">
72+
<argument name="attributeSet" value="{{BundleProduct.defaultAttribute}}"/>
73+
</actionGroup>
74+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="searchForAttrSet2"/>
75+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectAttrSet2"/>
7076

7177
<!--save the product/published by default-->
7278
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickSaveButton2"/>

app/code/Magento/Bundle/Test/Mftf/Test/AdminBasicBundleProductAttributesTest.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,11 @@
109109
<checkOption selector="{{AdminProductFormBundleSection.enableDisableToggle}}" stepKey="clickOnEnableDisableToggleAgain"/>
110110

111111
<!--Apply Attribute Set-->
112-
<click selector="{{AdminProductFormSection.attributeSet}}" stepKey="startEditAttrSet"/>
113-
<fillField selector="{{AdminProductFormSection.attributeSetFilter}}" userInput="{{ProductAttributeFrontendLabelTwo.label}}" stepKey="searchForAttrSet"/>
114-
<click selector="{{AdminProductFormSection.attributeSetFilterResultByName(ProductAttributeFrontendLabelTwo.label)}}" stepKey="selectAttrSet"/>
112+
<actionGroup ref="AdminSelectAttributeSetOnEditProductPageActionGroup" stepKey="startEditAttrSet">
113+
<argument name="attributeSet" value="{{ProductAttributeFrontendLabelTwo.label}}"/>
114+
</actionGroup>
115+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="searchForAttrSet"/>
116+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectAttrSet"/>
115117

116118
<!--Product name and SKU-->
117119
<fillField selector="{{AdminProductFormBundleSection.productName}}" userInput="{{BundleProduct.name2}}" stepKey="fillProductName"/>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminSelectAttributeSetActionGroup.xml renamed to app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminSelectAttributeSetOnEditProductPageActionGroup.xml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,16 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
<actionGroup name="AdminSelectAttributeSetActionGroup">
11+
<actionGroup name="AdminSelectAttributeSetOnEditProductPageActionGroup">
1212
<annotations>
1313
<description></description>
1414
</annotations>
1515
<arguments>
16-
<argument name="attributeSet" type="entity"/>
16+
<argument name="attributeSet" type="string"/>
1717
</arguments>
1818

19-
<click selector="{{AdminProductFormSection.attributeSet}}" stepKey="startEditAttrSet"/>
20-
<fillField selector="{{AdminProductFormSection.attributeSetFilter}}" userInput="{{attributeSet.attribute_set_name}}" stepKey="searchForAttrSet"/>
21-
<click selector="{{AdminProductFormSection.attributeSetFilterResult}}" stepKey="selectAttrSet"/>
22-
19+
<click selector="{{AdminProductFormSection.attributeSet}}" stepKey="clickAttributeSetDropdown"/>
20+
<fillField selector="{{AdminProductFormSection.attributeSetFilter}}" userInput="{{attributeSet}}" stepKey="searchForAttributeSet"/>
21+
<click selector="{{AdminProductFormSection.attributeSetFilterResult}}" stepKey="selectAttributeSet"/>
2322
</actionGroup>
2423
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Test/AdminChangeProductAttributeSetTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@
6060
<argument name="product" value="$$createSimpleProduct$$"/>
6161
</actionGroup>
6262

63-
<actionGroup ref="AdminSelectAttributeSetActionGroup" stepKey="startEditAttrSet">
64-
<argument name="attributeSet" value="CatalogAttributeSet"/>
63+
<actionGroup ref="AdminSelectAttributeSetOnEditProductPageActionGroup" stepKey="startEditAttrSet">
64+
<argument name="attributeSet" value="$$createAttributeSet.attribute_set_name$$"/>
6565
</actionGroup>
6666

6767
<waitForText userInput="$$createProductAttribute.default_frontend_label$$" stepKey="seeAttributeInForm"/>

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAttributeSetEntityTest.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,11 @@
6464
</actionGroup>
6565

6666
<!-- Switch from default attribute set to new attribute set -->
67-
<click selector="{{AdminProductFormSection.attributeSet}}" stepKey="startEditAttrSet"/>
68-
<fillField selector="{{AdminProductFormSection.attributeSetFilter}}" userInput="$$createAttributeSet.attribute_set_name$$" stepKey="searchForAttrSet"/>
69-
<click selector="{{AdminProductFormSection.attributeSetFilterResult}}" stepKey="selectAttrSet"/>
67+
<actionGroup ref="AdminSelectAttributeSetOnEditProductPageActionGroup" stepKey="startEditAttrSet">
68+
<argument name="attributeSet" value="$$createAttributeSet.attribute_set_name$$"/>
69+
</actionGroup>
70+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="searchForAttrSet"/>
71+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectAttrSet"/>
7072

7173
<!-- See new attribute set -->
7274
<see selector="{{AdminProductFormSection.attributeSet}}" userInput="$$createAttributeSet.attribute_set_name$$" stepKey="seeAttributeSetName"/>

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateProductCustomAttributeSetTest.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,11 @@
6262
<!-- Switch from default attribute set to new attribute set -->
6363
<!-- A scrollToTopOfPage is needed to hide the floating header -->
6464
<scrollToTopOfPage stepKey="scrollToTop"/>
65-
<click selector="{{AdminProductFormSection.attributeSet}}" stepKey="startEditAttrSet"/>
66-
<fillField selector="{{AdminProductFormSection.attributeSetFilter}}" userInput="{{ProductAttributeFrontendLabel.label}}" stepKey="searchForAttrSet"/>
67-
<click selector="{{AdminProductFormSection.attributeSetFilterResult}}" stepKey="selectAttrSet"/>
65+
<actionGroup ref="AdminSelectAttributeSetOnEditProductPageActionGroup" stepKey="startEditAttrSet">
66+
<argument name="attributeSet" value="{{ProductAttributeFrontendLabel.label}}"/>
67+
</actionGroup>
68+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="searchForAttrSet"/>
69+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectAttrSet"/>
6870

6971
<!-- See new attibute set -->
7072
<seeElementInDOM selector="{{AdminProductFormSection.divByDataIndex('testgroupname')}}" stepKey="seeTestGroupName"/>

0 commit comments

Comments
 (0)