Skip to content

Commit a7a12ae

Browse files
committed
Merge branch 'RE-develop' into MC-160
2 parents 2cad06d + 33c7fc4 commit a7a12ae

File tree

80 files changed

+2009
-203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+2009
-203
lines changed

app/code/Magento/Bundle/Test/Mftf/ActionGroup/SetBundleProductAttributesActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="SetBundleProductAttributes">
1212
<arguments>
1313
<argument name="attributeSet" defaultValue="Default" type="string"/>
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
11+
<test name="AdminAddDefaultVideoBundleProductTest" extends="AdminAddDefaultVideoSimpleProductTest">
12+
<annotations>
13+
<features value="Bundle"/>
14+
<stories value="Add/remove images and videos for all product types and category"/>
15+
<title value="Admin should be able to add default video for a Bundle Product"/>
16+
<description value="Admin should be able to add default video for a Bundle Product"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-110"/>
19+
<group value="Bundle"/>
20+
</annotations>
21+
<before>
22+
<createData entity="SimpleProduct2" stepKey="simpleProduct1"/>
23+
<createData entity="SimpleProduct2" stepKey="simpleProduct2"/>
24+
</before>
25+
<after>
26+
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
27+
<deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/>
28+
</after>
29+
30+
<!-- Create a bundle product -->
31+
<!-- Replacing steps in base AdminAddDefaultVideoSimpleProductTest -->
32+
<actionGroup ref="goToCreateProductPage" stepKey="goToCreateProductPage">
33+
<argument name="product" value="BundleProduct"/>
34+
</actionGroup>
35+
<actionGroup ref="fillProductNameAndSkuInProductForm" stepKey="fillMainProductForm">
36+
<argument name="product" value="BundleProduct"/>
37+
</actionGroup>
38+
39+
<!-- Add two bundle items -->
40+
<scrollTo selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" x="0" y="-100" stepKey="scrollToSection" after="addProductVideo"/>
41+
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="openBundleSection" after="scrollToSection"/>
42+
<click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption" after="openBundleSection"/>
43+
<waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="waitForBundleTitle" after="clickAddOption"/>
44+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="fillBundleTitle" after="waitForBundleTitle"/>
45+
<selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('0')}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="selectOptionBundleTitle" after="fillBundleTitle"/>
46+
<waitForElementVisible selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="waitForAddProducts" after="selectOptionBundleTitle"/>
47+
<click selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="clickAddProducts" after="waitForAddProducts"/>
48+
<waitForPageLoad stepKey="waitForPageLoad" after="clickAddProducts"/>
49+
<actionGroup ref="filterProductGridBySku" stepKey="filterProductGridBySku1" after="waitForPageLoad">
50+
<argument name="product" value="$$simpleProduct1$$"/>
51+
</actionGroup>
52+
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="checkOption1" after="filterProductGridBySku1"/>
53+
<actionGroup ref="filterProductGridBySku" stepKey="filterProductGridBySku2" after="checkOption1">
54+
<argument name="product" value="$$simpleProduct2$$"/>
55+
</actionGroup>
56+
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="checkOption2" after="filterProductGridBySku2"/>
57+
<click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="addProducts" after="checkOption2"/>
58+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillQty1" after="addProducts"/>
59+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillQty2" before="saveProductForm"/>
60+
61+
<!-- Assert product in storefront product page -->
62+
<actionGroup ref="AssertProductNameAndSkuInStorefrontProductPage" stepKey="AssertProductInStorefrontProductPage">
63+
<argument name="product" value="BundleProduct"/>
64+
</actionGroup>
65+
</test>
66+
</tests>

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393

9494
<!--Create second attribute set for edit-->
9595
<actionGroup ref="CreateDefaultAttributeSet" stepKey="createSecondAttributeSet">
96-
<argument name="label" value="{{ProductAttributeFrontendLabel.label}}2"/>
96+
<argument name="label" value="{{ProductAttributeFrontendLabelTwo.label}}"/>
9797
</actionGroup>
9898

9999
<!--Filter catalog-->
@@ -112,8 +112,8 @@
112112

113113
<!--Apply Attribute Set-->
114114
<click selector="{{AdminProductFormSection.attributeSet}}" stepKey="startEditAttrSet"/>
115-
<fillField selector="{{AdminProductFormSection.attributeSetFilter}}" userInput="{{ProductAttributeFrontendLabel.label}}2" stepKey="searchForAttrSet"/>
116-
<click selector="{{AdminProductFormSection.attributeSetFilterResult}}" stepKey="selectAttrSet"/>
115+
<fillField selector="{{AdminProductFormSection.attributeSetFilter}}" userInput="{{ProductAttributeFrontendLabelTwo.label}}" stepKey="searchForAttrSet"/>
116+
<click selector="{{AdminProductFormSection.attributeSetFilterResultByName(ProductAttributeFrontendLabelTwo.label)}}" stepKey="selectAttrSet"/>
117117

118118
<!--Product name and SKU-->
119119
<fillField selector="{{AdminProductFormBundleSection.productName}}" userInput="{{BundleProduct.name2}}" stepKey="fillProductName"/>
@@ -153,7 +153,7 @@
153153
<seeElement selector="{{AdminProductFormBundleSection.enableDisableToggleOn}}" stepKey="seeToggleIsOn2"/>
154154

155155
<!--Attribute Set-->
156-
<seeOptionIsSelected selector="{{AdminProductFormSection.attributeSet}}" userInput="{{ProductAttributeFrontendLabel.label}}2" stepKey="seeAttributeSet2"/>
156+
<seeOptionIsSelected selector="{{AdminProductFormSection.attributeSet}}" userInput="{{ProductAttributeFrontendLabelTwo.label}}" stepKey="seeAttributeSet2"/>
157157

158158
<!--Product name and SKU-->
159159
<seeInField selector="{{AdminProductFormBundleSection.productName}}" userInput="{{BundleProduct.name2}}" stepKey="seeProductName2"/>
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
11+
<test name="AdminRemoveDefaultVideoBundleProductTest" extends="AdminRemoveDefaultVideoSimpleProductTest">
12+
<annotations>
13+
<features value="Bundle"/>
14+
<stories value="Add/remove images and videos for all product types and category"/>
15+
<title value="Admin should be able to remove default video from a Bundle Product"/>
16+
<description value="Admin should be able to remove default video from a Bundle Product"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-205"/>
19+
<group value="Bundle"/>
20+
</annotations>
21+
<before>
22+
<createData entity="SimpleProduct2" stepKey="simpleProduct1"/>
23+
<createData entity="SimpleProduct2" stepKey="simpleProduct2"/>
24+
</before>
25+
<after>
26+
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
27+
<deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/>
28+
</after>
29+
30+
<!-- Create a bundle product -->
31+
<!-- Replacing steps in base AdminRemoveDefaultVideoSimpleProductTest -->
32+
<actionGroup ref="goToCreateProductPage" stepKey="goToCreateProductPage">
33+
<argument name="product" value="BundleProduct"/>
34+
</actionGroup>
35+
<actionGroup ref="fillProductNameAndSkuInProductForm" stepKey="fillMainProductForm">
36+
<argument name="product" value="BundleProduct"/>
37+
</actionGroup>
38+
39+
<!-- Add two bundle items -->
40+
<scrollTo selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" x="0" y="-100" stepKey="scrollToSection" after="addProductVideo"/>
41+
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="openBundleSection" after="scrollToSection"/>
42+
<click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption" after="openBundleSection"/>
43+
<waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="waitForBundleTitle" after="clickAddOption"/>
44+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="fillBundleTitle" after="waitForBundleTitle"/>
45+
<selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('0')}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="selectOptionBundleTitle" after="fillBundleTitle"/>
46+
<waitForElementVisible selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="waitForAddProducts" after="selectOptionBundleTitle"/>
47+
<click selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="clickAddProducts" after="waitForAddProducts"/>
48+
<waitForPageLoad stepKey="waitForPageLoad" after="clickAddProducts"/>
49+
<actionGroup ref="filterProductGridBySku" stepKey="filterProductGridBySku1" after="waitForPageLoad">
50+
<argument name="product" value="$$simpleProduct1$$"/>
51+
</actionGroup>
52+
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="checkOption1" after="filterProductGridBySku1"/>
53+
<actionGroup ref="filterProductGridBySku" stepKey="filterProductGridBySku2" after="checkOption1">
54+
<argument name="product" value="$$simpleProduct2$$"/>
55+
</actionGroup>
56+
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="checkOption2" after="filterProductGridBySku2"/>
57+
<click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="addProducts" after="checkOption2"/>
58+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillQty1" after="addProducts"/>
59+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillQty2" before="saveProductForm"/>
60+
61+
<!-- Assert product in storefront product page -->
62+
<actionGroup ref="AssertProductNameAndSkuInStorefrontProductPage" stepKey="AssertProductInStorefrontProductPage">
63+
<argument name="product" value="BundleProduct"/>
64+
</actionGroup>
65+
</test>
66+
</tests>

0 commit comments

Comments
 (0)