Skip to content

Commit 7f9a392

Browse files
committed
Merge branch 'MC-113' into RE-develop
2 parents 1a5c9e5 + eb64a14 commit 7f9a392

12 files changed

+516
-150
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
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="AdminAddDefaultImageBundleProductTest">
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 images for a Bundle Product"/>
16+
<description value="Admin should be able to add default images for a Bundle Product"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-115"/>
19+
<group value="Bundle"/>
20+
</annotations>
21+
<before>
22+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
23+
<createData entity="SimpleProduct2" stepKey="simpleProduct1"/>
24+
<createData entity="SimpleProduct2" stepKey="simpleProduct2"/>
25+
</before>
26+
<after>
27+
<amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/>
28+
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
29+
<deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/>
30+
</after>
31+
32+
<!-- Create a bundle product -->
33+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPageBundle"/>
34+
<waitForPageLoad stepKey="waitForProductPageLoadBundle"/>
35+
<actionGroup ref="goToCreateProductPage" stepKey="goToCreateBundleProduct">
36+
<argument name="product" value="BundleProduct"/>
37+
</actionGroup>
38+
39+
<actionGroup ref="fillProductNameAndSkuInProductForm" stepKey="fillBundleProductNameAndSku">
40+
<argument name="product" value="BundleProduct"/>
41+
</actionGroup>
42+
43+
<!-- Add two bundle items -->
44+
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems"/>
45+
<click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption3"/>
46+
<waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="waitForBundleOptions"/>
47+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="fillOptionTitle"/>
48+
<selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('0')}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="selectInputType"/>
49+
<waitForElementVisible selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="waitForAddProductsToBundle"/>
50+
<click selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="clickAddProductsToOption"/>
51+
<waitForPageLoad stepKey="waitForPageLoadAfterBundleProducts"/>
52+
<actionGroup ref="filterProductGridBySku" stepKey="filterBundleProductOptions">
53+
<argument name="product" value="$$simpleProduct1$$"/>
54+
</actionGroup>
55+
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow"/>
56+
<actionGroup ref="filterProductGridBySku" stepKey="filterBundleProductOptions2">
57+
<argument name="product" value="$$simpleProduct2$$"/>
58+
</actionGroup>
59+
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectFirstGridRow2"/>
60+
<click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="clickAddSelectedBundleProducts"/>
61+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty1"/>
62+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillProductDefaultQty2"/>
63+
64+
<!-- Add image to product -->
65+
<actionGroup ref="addProductImage" stepKey="addImageForProduct">
66+
<argument name="image" value="MagentoLogo"/>
67+
</actionGroup>
68+
69+
<!--Save product-->
70+
<actionGroup ref="saveProductForm" stepKey="saveProduct"/>
71+
72+
<!-- Assert product image in admin product form -->
73+
<actionGroup ref="assertProductImageAdminProductPage" stepKey="assertProductImageAdminProductPage"/>
74+
75+
<!-- Assert product in storefront product page -->
76+
<actionGroup ref="AssertProductNameAndSkuInStorefrontProductPage" stepKey="AssertProductInStorefrontProductPage">
77+
<argument name="product" value="BundleProduct"/>
78+
</actionGroup>
79+
80+
<!-- Assert product image in storefront product page -->
81+
<actionGroup ref="assertProductImageStorefrontProductPage" stepKey="assertProductImageStorefrontProductPage">
82+
<argument name="product" value="BundleProduct"/>
83+
<argument name="image" value="MagentoLogo"/>
84+
</actionGroup>
85+
</test>
86+
</tests>
Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
11-
<test name="AdminAddRemoveProductImageBundleProductTest">
11+
<test name="AdminRemoveDefaultImageBundleProductTest">
1212
<annotations>
1313
<features value="Bundle"/>
14-
<stories value="Bundle Product Add/Remove Images"/>
15-
<title value="Admin should be able to add/remove images for a Bundle Product"/>
16-
<description value="Admin should be able to add/remove images for a Bundle Product"/>
14+
<stories value="Add/remove images and videos for all product types and category"/>
15+
<title value="Admin should be able to remove default images from a Bundle Product"/>
16+
<description value="Admin should be able to remove default images from a Bundle Product"/>
1717
<severity value="MAJOR"/>
18-
<testCaseId value="MC-115"/>
18+
<testCaseId value="MC-200"/>
1919
<group value="Bundle"/>
2020
</annotations>
2121
<before>
@@ -69,27 +69,7 @@
6969
<!--Save product-->
7070
<actionGroup ref="saveProductForm" stepKey="saveProduct"/>
7171

72-
<!-- Assert product image in admin product form -->
73-
<actionGroup ref="assertProductImageAdminProductPage" stepKey="assertProductImageAdminProductPage"/>
74-
75-
<!-- Assert product in storefront product page -->
76-
<actionGroup ref="AssertProductNameAndSkuInStorefrontProductPage" stepKey="AssertProductInStorefrontProductPage">
77-
<argument name="product" value="BundleProduct"/>
78-
</actionGroup>
79-
80-
<!-- Assert product image in storefront product page -->
81-
<actionGroup ref="assertProductImageStorefrontProductPage" stepKey="assertProductImageStorefrontProductPage">
82-
<argument name="product" value="BundleProduct"/>
83-
<argument name="image" value="MagentoLogo"/>
84-
</actionGroup>
85-
8672
<!-- Remove image from product -->
87-
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="adminProductIndexPageRemove"/>
88-
<waitForPageLoad stepKey="waitForProductIndexPageLoad2"/>
89-
<actionGroup ref="filterProductGridBySku" stepKey="filterProductGridBySku">
90-
<argument name="product" value="BundleProduct"/>
91-
</actionGroup>
92-
<actionGroup ref="openProducForEditByClickingRowXColumnYInProductGrid" stepKey="openProducForEditByClickingRow1Column2InProductGrid"/>
9373
<actionGroup ref="removeProductImage" stepKey="removeProductImage"/>
9474

9575
<!-- Skip success message check when saving product because of bug MAGETWO-91177 -->
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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="AdminAddDefaultImageSimpleProductTest">
12+
<annotations>
13+
<features value="Catalog"/>
14+
<stories value="Add/remove images and videos for all product types and category"/>
15+
<title value="Admin should be able to add default image for a Simple Product"/>
16+
<description value="Admin should be able to add default images for a Simple Product"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-113"/>
19+
<group value="Catalog"/>
20+
</annotations>
21+
<before>
22+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
23+
</before>
24+
<after>
25+
<amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/>
26+
</after>
27+
28+
<!--Create product-->
29+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
30+
<waitForPageLoad stepKey="waitForProductIndexPage"/>
31+
<actionGroup ref="resetProductGridToDefaultView" stepKey="resetProductGridColumnsInitial"/>
32+
<actionGroup ref="goToCreateProductPage" stepKey="goToCreateSimpleProduct">
33+
<argument name="product" value="SimpleProduct3"/>
34+
</actionGroup>
35+
<actionGroup ref="fillMainProductFormNoWeight" stepKey="fillSimpleProductMain">
36+
<argument name="product" value="SimpleProduct3"/>
37+
</actionGroup>
38+
39+
<!-- Add image to product -->
40+
<actionGroup ref="addProductImage" stepKey="addImageForProductSimple">
41+
<argument name="image" value="MagentoLogo"/>
42+
</actionGroup>
43+
<actionGroup ref="saveProductForm" stepKey="saveSimpleProduct"/>
44+
45+
<!-- Assert product image in admin product form -->
46+
<actionGroup ref="assertProductImageAdminProductPage" stepKey="assertProductImageAdminProductPage"/>
47+
48+
<!-- Assert product in storefront product page -->
49+
<actionGroup ref="AssertProductInStorefrontProductPage" stepKey="AssertProductInStorefrontProductPage">
50+
<argument name="product" value="SimpleProduct3"/>
51+
</actionGroup>
52+
53+
<!-- Assert product image in storefront product page -->
54+
<actionGroup ref="assertProductImageStorefrontProductPage" stepKey="assertProductImageStorefrontProductPage">
55+
<argument name="product" value="SimpleProduct3"/>
56+
<argument name="image" value="MagentoLogo"/>
57+
</actionGroup>
58+
</test>
59+
</tests>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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="AdminAddRemoveProductImageVirtualProductTest">
12+
<annotations>
13+
<features value="Catalog"/>
14+
<stories value="Add/remove images and videos for all product types and category"/>
15+
<title value="Admin should be able to add default images for a Virtual Product"/>
16+
<description value="Admin should be able to add default images for a Virtual Product"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-103"/>
19+
<group value="Catalog"/>
20+
</annotations>
21+
<before>
22+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
23+
</before>
24+
<after>
25+
<amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/>
26+
</after>
27+
28+
<!--Create product-->
29+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
30+
<waitForPageLoad stepKey="waitForProductIndexPage"/>
31+
<actionGroup ref="resetProductGridToDefaultView" stepKey="resetProductGridColumnsInitial"/>
32+
<actionGroup ref="goToCreateProductPage" stepKey="goToCreateProduct">
33+
<argument name="product" value="defaultVirtualProduct"/>
34+
</actionGroup>
35+
<actionGroup ref="fillMainProductFormNoWeight" stepKey="fillProductMain">
36+
<argument name="product" value="defaultVirtualProduct"/>
37+
</actionGroup>
38+
39+
<!-- Add image to product -->
40+
<actionGroup ref="addProductImage" stepKey="addImageForProduct">
41+
<argument name="image" value="MagentoLogo"/>
42+
</actionGroup>
43+
<actionGroup ref="saveProductForm" stepKey="saveProduct"/>
44+
45+
<!-- Assert product image in admin product form -->
46+
<actionGroup ref="assertProductImageAdminProductPage" stepKey="assertProductImageAdminProductPage"/>
47+
48+
<!-- Assert product in storefront product page -->
49+
<actionGroup ref="AssertProductInStorefrontProductPage" stepKey="AssertProductInStorefrontProductPage">
50+
<argument name="product" value="defaultVirtualProduct"/>
51+
</actionGroup>
52+
53+
<!-- Assert product image in storefront product page -->
54+
<actionGroup ref="assertProductImageStorefrontProductPage" stepKey="assertProductImageStorefrontProductPage">
55+
<argument name="product" value="defaultVirtualProduct"/>
56+
<argument name="image" value="MagentoLogo"/>
57+
</actionGroup>
58+
</test>
59+
</tests>
Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,16 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
11-
<test name="AdminAddRemoveProductImageSimpleProductTest">
11+
<test name="AdminRemoveDefaultImageSimpleProductTest">
1212
<annotations>
1313
<features value="Catalog"/>
14-
<stories value="Simple Product Add/Remove Images"/>
15-
<title value="Admin should be able to add/remove images for a Simple Product"/>
16-
<description value="Admin should be able to add/remove images for a Simple Product"/>
14+
<stories value="Add/remove images and videos for all product types and category"/>
15+
<title value="Admin should be able to remove default images from a Simple Product"/>
16+
<description value="Admin should be able to remove default images from a Simple Product"/>
1717
<severity value="MAJOR"/>
18-
<testCaseId value="MC-113"/>
18+
<testCaseId value="MC-195"/>
1919
<group value="Catalog"/>
20+
<group value="ji"/>
2021
</annotations>
2122
<before>
2223
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
@@ -40,29 +41,10 @@
4041
<actionGroup ref="addProductImage" stepKey="addImageForProductSimple">
4142
<argument name="image" value="MagentoLogo"/>
4243
</actionGroup>
43-
<actionGroup ref="saveProductForm" stepKey="saveSimpleProduct"/>
44-
45-
<!-- Assert product image in admin product form -->
46-
<actionGroup ref="assertProductImageAdminProductPage" stepKey="assertProductImageAdminProductPage"/>
47-
48-
<!-- Assert product in storefront product page -->
49-
<actionGroup ref="AssertProductInStorefrontProductPage" stepKey="AssertProductInStorefrontProductPage">
50-
<argument name="product" value="SimpleProduct3"/>
51-
</actionGroup>
5244

53-
<!-- Assert product image in storefront product page -->
54-
<actionGroup ref="assertProductImageStorefrontProductPage" stepKey="assertProductImageStorefrontProductPage">
55-
<argument name="product" value="SimpleProduct3"/>
56-
<argument name="image" value="MagentoLogo"/>
57-
</actionGroup>
45+
<actionGroup ref="saveProductForm" stepKey="saveSimpleProduct"/>
5846

5947
<!-- Remove image from product -->
60-
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="adminProductIndexPageRemove"/>
61-
<waitForPageLoad stepKey="waitForProductIndexPageLoad2"/>
62-
<actionGroup ref="filterProductGridBySku" stepKey="filterProductGridBySku">
63-
<argument name="product" value="SimpleProduct3"/>
64-
</actionGroup>
65-
<actionGroup ref="openProducForEditByClickingRowXColumnYInProductGrid" stepKey="openProducForEditByClickingRow1Column2InProductGrid"/>
6648
<actionGroup ref="removeProductImage" stepKey="removeProductImage"/>
6749

6850
<!-- Skip success message check when saving product because of bug MAGETWO-91177 -->
Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
11-
<test name="AdminAddRemoveProductImageVirtualProductTest">
11+
<test name="AdminRemoveDefaultImageVirtualProductTest">
1212
<annotations>
1313
<features value="Catalog"/>
14-
<stories value="Virtual Product Add/Remove Images"/>
15-
<title value="Admin should be able to add/remove images for a Virtual Product"/>
16-
<description value="Admin should be able to add/remove images for a Virtual Product"/>
14+
<stories value="Add/remove images and videos for all product types and category"/>
15+
<title value="Admin should be able to remove default images from a Virtual Product"/>
16+
<description value="Admin should be able to remove default images from a Virtual Product"/>
1717
<severity value="MAJOR"/>
18-
<testCaseId value="MC-103"/>
18+
<testCaseId value="MC-197"/>
1919
<group value="Catalog"/>
2020
</annotations>
2121
<before>
@@ -40,29 +40,10 @@
4040
<actionGroup ref="addProductImage" stepKey="addImageForProduct">
4141
<argument name="image" value="MagentoLogo"/>
4242
</actionGroup>
43-
<actionGroup ref="saveProductForm" stepKey="saveProduct"/>
44-
45-
<!-- Assert product image in admin product form -->
46-
<actionGroup ref="assertProductImageAdminProductPage" stepKey="assertProductImageAdminProductPage"/>
47-
48-
<!-- Assert product in storefront product page -->
49-
<actionGroup ref="AssertProductInStorefrontProductPage" stepKey="AssertProductInStorefrontProductPage">
50-
<argument name="product" value="defaultVirtualProduct"/>
51-
</actionGroup>
5243

53-
<!-- Assert product image in storefront product page -->
54-
<actionGroup ref="assertProductImageStorefrontProductPage" stepKey="assertProductImageStorefrontProductPage">
55-
<argument name="product" value="defaultVirtualProduct"/>
56-
<argument name="image" value="MagentoLogo"/>
57-
</actionGroup>
44+
<actionGroup ref="saveProductForm" stepKey="saveProduct"/>
5845

5946
<!-- Remove image from product -->
60-
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="adminProductIndexPageRemove"/>
61-
<waitForPageLoad stepKey="waitForProductIndexPageLoad2"/>
62-
<actionGroup ref="filterProductGridBySku" stepKey="filterProductGridBySku">
63-
<argument name="product" value="defaultVirtualProduct"/>
64-
</actionGroup>
65-
<actionGroup ref="openProducForEditByClickingRowXColumnYInProductGrid" stepKey="openProducForEditByClickingRow1Column2InProductGrid"/>
6647
<actionGroup ref="removeProductImage" stepKey="removeProductImage"/>
6748

6849
<!-- Skip success message check when saving product because of bug MAGETWO-91177 -->

0 commit comments

Comments
 (0)