Skip to content

Commit a32ec55

Browse files
committed
MC-206: Admin should be able to remove default video from simple product
- updated mftf test
1 parent 6140322 commit a32ec55

File tree

2 files changed

+58
-32
lines changed

2 files changed

+58
-32
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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="AdminRemoveDefaultVideoSimpleProductTest">
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 product video from a Simple Product"/>
16+
<description value="Admin should be able to remove default product video from a Simple Product"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-206"/>
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="adminProductIndexPageAdd"/>
30+
<waitForPageLoad stepKey="waitForProductIndexPageLoad"/>
31+
<actionGroup ref="goToCreateProductPage" stepKey="goToCreateProductPage">
32+
<argument name="product" value="ApiSimpleProduct"/>
33+
</actionGroup>
34+
<actionGroup ref="fillMainProductFormNoWeight" stepKey="fillMainProductForm">
35+
<argument name="product" value="ApiSimpleProduct"/>
36+
</actionGroup>
37+
38+
<!-- Save product -->
39+
<actionGroup ref="saveProductForm" stepKey="saveProductForm"/>
40+
41+
<!-- Save product -->
42+
<actionGroup ref="saveProductForm" stepKey="saveProductFormAfterRemove"/>
43+
44+
<!-- Assert product in storefront product page -->
45+
<actionGroup ref="AssertProductInStorefrontProductPage" stepKey="AssertProductInStorefrontProductPage">
46+
<argument name="product" value="ApiSimpleProduct"/>
47+
</actionGroup>
48+
</test>
49+
</tests>

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

Lines changed: 9 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,50 +10,27 @@
1010
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
1111
<test name="AdminRemoveDefaultVideoSimpleProductTest">
1212
<annotations>
13-
<features value="ProductVideo"/>
14-
<stories value="Add/remove images and videos for all product types and category"/>
15-
<title value="Admin should be able to remove default product video from a Simple Product"/>
16-
<description value="Admin should be able to remove default product video from a Simple Product"/>
17-
<severity value="MAJOR"/>
18-
<testCaseId value="MC-206"/>
1913
<group value="ProductVideo"/>
2014
</annotations>
2115
<before>
22-
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
2316
<!-- Set product video Youtube api key configuration -->
24-
<createData entity="ProductVideoYoutubeApiKeyConfig" stepKey="setStoreConfig"/>
17+
<createData entity="ProductVideoYoutubeApiKeyConfig" stepKey="setStoreConfig" after="loginAsAdmin"/>
2518
</before>
2619
<after>
27-
<amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/>
28-
<!-- Set product video default configuration -->
29-
<createData entity="DefaultProductVideoConfig" stepKey="setStoreDefaultConfig"/>
20+
<!-- Set product video configuration to default -->
21+
<createData entity="DefaultProductVideoConfig" stepKey="setStoreDefaultConfig" before="amOnLogoutPage"/>
3022
</after>
3123

32-
<!-- Create product -->
33-
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="adminProductIndexPageAdd"/>
34-
<waitForPageLoad stepKey="waitForProductIndexPageLoad"/>
35-
<actionGroup ref="goToCreateProductPage" stepKey="goToCreateProductPage">
36-
<argument name="product" value="ApiSimpleProduct"/>
37-
</actionGroup>
38-
<actionGroup ref="fillMainProductFormNoWeight" stepKey="fillMainProductForm">
39-
<argument name="product" value="ApiSimpleProduct"/>
40-
</actionGroup>
4124
<!-- Add product video -->
42-
<actionGroup ref="addProductVideo" stepKey="addProductVideo"/>
43-
<!-- Save product -->
44-
<actionGroup ref="saveProductForm" stepKey="saveProductForm"/>
25+
<actionGroup ref="addProductVideo" stepKey="addProductVideo" after="fillMainProductForm"/>
26+
4527
<!-- Remove product video -->
46-
<actionGroup ref="removeProductVideo" stepKey="removeProductVideo"/>
47-
<!-- Save product -->
48-
<actionGroup ref="saveProductForm" stepKey="saveProductFormAfterRemove"/>
28+
<actionGroup ref="removeProductVideo" stepKey="removeProductVideo" after="saveProductForm"/>
4929

5030
<!-- Assert product video not in admin product form -->
51-
<actionGroup ref="assertProductVideoNotInAdminProductPage" stepKey="assertProductVideoNotInAdminProductPage"/>
52-
<!-- Assert product in storefront product page -->
53-
<actionGroup ref="AssertProductInStorefrontProductPage" stepKey="AssertProductInStorefrontProductPageAfterRemove">
54-
<argument name="product" value="ApiSimpleProduct"/>
55-
</actionGroup>
31+
<actionGroup ref="assertProductVideoNotInAdminProductPage" stepKey="assertProductVideoNotInAdminProductPage" after="saveProductFormAfterRemove"/>
32+
5633
<!-- Assert product video not in storefront product page -->
57-
<actionGroup ref="assertProductVideoNotInStorefrontProductPage" stepKey="assertProductVideoNotInStorefrontProductPage"/>
34+
<actionGroup ref="assertProductVideoNotInStorefrontProductPage" stepKey="assertProductVideoNotInStorefrontProductPage" after="AssertProductInStorefrontProductPage"/>
5835
</test>
5936
</tests>

0 commit comments

Comments
 (0)