Skip to content

Commit 24c76b1

Browse files
committed
MC-203: Admin should be able to remove default video for grouped products
- Added mftf test
1 parent ce4cc6f commit 24c76b1

File tree

4 files changed

+84
-0
lines changed

4 files changed

+84
-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="AdminRemoveDefaultVideoGroupedProductTest" extends="AdminRemoveDefaultVideoDownloadableProductTest">
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 remove default video from a Grouped Product"/>
16+
<description value="Admin should be able to remove default video from a Grouped Product"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-203"/>
19+
<group value="Catalog"/>
20+
</annotations>
21+
22+
<!-- Base AdminRemoveDefaultVideoGroupedProductTest -->
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="AdminRemoveDefaultVideoGroupedProductTest" extends="AdminRemoveDefaultVideoDownloadableProductTest">
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="anchor11">
50+
<argument name="product" value="GroupedProduct"/>
51+
</actionGroup>
52+
</test>
53+
</tests>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/Test/AdminAddDefaultVideoDownloadableProductTest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
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">
1111
<test name="AdminAddDefaultVideoDownloadableProductTest">
12+
<annotations>
13+
<group value="ProductVideo"/>
14+
</annotations>
1215
<before>
1316
<!-- Set product video Youtube api key configuration -->
1417
<createData entity="ProductVideoYoutubeApiKeyConfig" stepKey="setStoreConfig" after="loginAsAdmin"/>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ProductVideo/Test/AdminRemoveDefaultVideoDownloadableProductTest.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
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">
1111
<test name="AdminRemoveDefaultVideoDownloadableProductTest">
12+
<annotations>
13+
<group value="ProductVideo"/>
14+
</annotations>
1215
<before>
1316
<!-- Set product video Youtube api key configuration -->
1417
<createData entity="ProductVideoYoutubeApiKeyConfig" stepKey="setStoreConfig" after="loginAsAdmin"/>

0 commit comments

Comments
 (0)