Skip to content

Commit ce4cc6f

Browse files
committed
MC-108: Admin should be able to add default video for grouped products
- Added mftf test
1 parent d58077e commit ce4cc6f

File tree

2 files changed

+78
-0
lines changed

2 files changed

+78
-0
lines changed
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+
<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="AdminAddDefaultVideoGroupedProductTest" extends="AdminAddDefaultVideoDownloadableProductTest">
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 video for a Grouped Product"/>
16+
<description value="Admin should be able to add default video for a Grouped Product"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-108"/>
19+
<group value="Catalog"/>
20+
</annotations>
21+
22+
<!-- Base AdminAddDefaultVideoGroupedProductTest -->
23+
24+
</test>
25+
</tests>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
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="AdminAddDefaultVideoGroupedProductTest" extends="AdminAddDefaultVideoDownloadableProductTest">
12+
<annotations>
13+
<group value="GroupedProduct"/>
14+
</annotations>
15+
<before>
16+
<createData entity="SimpleProduct2" stepKey="simpleProduct1"/>
17+
<createData entity="SimpleProduct2" stepKey="simpleProduct2"/>
18+
</before>
19+
<after>
20+
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
21+
<deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/>
22+
</after>
23+
24+
<!-- Create a grouped product -->
25+
<actionGroup ref="goToCreateProductPage" stepKey="goToCreateProductPage" after="waitForProductIndexPageLoad">
26+
<argument name="product" value="GroupedProduct"/>
27+
</actionGroup>
28+
<actionGroup ref="fillGroupedProductForm" stepKey="fillMainProductForm" after="goToCreateProductPage">
29+
<argument name="product" value="GroupedProduct"/>
30+
</actionGroup>
31+
32+
<!-- Add two simple products to grouped product -->
33+
<scrollTo selector="{{AdminProductFormGroupedProductsSection.toggleGroupedProduct}}" x="0" y="-100" stepKey="step0" after="anchor2"/>
34+
<conditionalClick selector="{{AdminProductFormGroupedProductsSection.toggleGroupedProduct}}" dependentSelector="{{AdminProductFormGroupedProductsSection.addProductsToGroup}}" visible="false" stepKey="step1" after="step0"/>
35+
<click selector="body" stepKey="step2" after="step1"/>
36+
<click selector="{{AdminProductFormGroupedProductsSection.addProductsToGroup}}" stepKey="step3" after="step2"/>
37+
<waitForElementVisible selector="{{AdminAddProductsToGroupPanel.filters}}" stepKey="step4" after="step3"/>
38+
<actionGroup ref="filterProductGridBySku" stepKey="step5" after="step4">
39+
<argument name="product" value="$$simpleProduct1$$"/>
40+
</actionGroup>
41+
<checkOption selector="{{AdminAddProductsToGroupPanel.firstCheckbox}}" stepKey="step6" after="step5"/>
42+
<actionGroup ref="filterProductGridBySku" stepKey="step7" after="step6">
43+
<argument name="product" value="$$simpleProduct2$$"/>
44+
</actionGroup>
45+
<checkOption selector="{{AdminAddProductsToGroupPanel.firstCheckbox}}" stepKey="step8" after="step7"/>
46+
<click selector="{{AdminAddProductsToGroupPanel.addSelectedProducts}}" stepKey="step9" after="step8"/>
47+
48+
<!-- Assert product in storefront product page -->
49+
<actionGroup ref="AssertProductNameAndSkuInStorefrontProductPage" stepKey="AssertProductInStorefrontProductPage" after="anchor5">
50+
<argument name="product" value="GroupedProduct"/>
51+
</actionGroup>
52+
</test>
53+
</tests>

0 commit comments

Comments
 (0)