Skip to content

Commit 4106bef

Browse files
committed
MC-114: Admin should be able to add default video for downloadable product
MC-110: Admin should be able to add default video for bundle product MC-108: Admin should be able to add default video for grouped product MC-207: Admin should be able to remove default video from downloadable product MC-205: Admin should be able to remove default video from bundle product MC-203: Admin should be able to remove default video from grouped product - updated mftf test
1 parent 4cf830f commit 4106bef

14 files changed

+129
-362
lines changed

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminAddDefaultVideoBundleProductTest.xml

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +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="AdminAddDefaultVideoBundleProductTest" extends="AdminAddDefaultVideoDownloadableProductTest">
11+
<test name="AdminAddDefaultVideoBundleProductTest" extends="AdminAddDefaultVideoSimpleProductTest">
1212
<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"/>
1319
<group value="Bundle"/>
1420
</annotations>
1521
<before>
@@ -22,6 +28,7 @@
2228
</after>
2329

2430
<!-- Create a bundle product -->
31+
<!-- Replacing steps in base AdminAddDefaultVideoSimpleProductTest -->
2532
<actionGroup ref="goToCreateProductPage" stepKey="goToCreateProductPage" after="waitForProductIndexPageLoad">
2633
<argument name="product" value="BundleProduct"/>
2734
</actionGroup>
@@ -30,28 +37,28 @@
3037
</actionGroup>
3138

3239
<!-- Add two bundle items -->
33-
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="step0" after="anchor2"/>
34-
<click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="step1" after="step0"/>
35-
<waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="step2" after="step1"/>
36-
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="step3" after="step2"/>
37-
<selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('0')}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="step4" after="step3"/>
38-
<waitForElementVisible selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="step5" after="step4"/>
39-
<click selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="step6" after="step5"/>
40-
<waitForPageLoad stepKey="step7" after="step6"/>
41-
<actionGroup ref="filterProductGridBySku" stepKey="step8" after="step7">
40+
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="openBundleSection" after="addProductVideo"/>
41+
<click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption" after="openBundleSection"/>
42+
<waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="waitForBundleTitle" after="clickAddOption"/>
43+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="fillBundleTitle" after="waitForBundleTitle"/>
44+
<selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('0')}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="selectOptionBundleTitle" after="fillBundleTitle"/>
45+
<waitForElementVisible selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="waitForAddProducts" after="selectOptionBundleTitle"/>
46+
<click selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="clickAddProducts" after="waitForAddProducts"/>
47+
<waitForPageLoad stepKey="waitForPageLoad" after="clickAddProducts"/>
48+
<actionGroup ref="filterProductGridBySku" stepKey="filterProductGridBySku1" after="waitForPageLoad">
4249
<argument name="product" value="$$simpleProduct1$$"/>
4350
</actionGroup>
44-
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="step9" after="step8"/>
45-
<actionGroup ref="filterProductGridBySku" stepKey="step10" after="step9">
51+
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="checkOption1" after="filterProductGridBySku1"/>
52+
<actionGroup ref="filterProductGridBySku" stepKey="filterProductGridBySku2" after="checkOption1">
4653
<argument name="product" value="$$simpleProduct2$$"/>
4754
</actionGroup>
48-
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="step11" after="step10"/>
49-
<click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="step12" after="step11"/>
50-
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="step13" after="step12"/>
51-
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="step14" after="step13"/>
55+
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="checkOption2" after="filterProductGridBySku2"/>
56+
<click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="addProducts" after="checkOption2"/>
57+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillQty1" after="addProducts"/>
58+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillQty2" before="saveProductForm"/>
5259

5360
<!-- Assert product in storefront product page -->
54-
<actionGroup ref="AssertProductNameAndSkuInStorefrontProductPage" stepKey="AssertProductInStorefrontProductPage" after="anchor5">
61+
<actionGroup ref="AssertProductNameAndSkuInStorefrontProductPage" stepKey="AssertProductInStorefrontProductPage">
5562
<argument name="product" value="BundleProduct"/>
5663
</actionGroup>
5764
</test>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Test/AdminRemoveDefaultVideoBundleProductTest.xml

Lines changed: 24 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +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="AdminRemoveDefaultVideoBundleProductTest" extends="AdminRemoveDefaultVideoDownloadableProductTest">
11+
<test name="AdminRemoveDefaultVideoBundleProductTest" extends="AdminRemoveDefaultVideoSimpleProductTest">
1212
<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"/>
1319
<group value="Bundle"/>
1420
</annotations>
1521
<before>
@@ -22,6 +28,7 @@
2228
</after>
2329

2430
<!-- Create a bundle product -->
31+
<!-- Replacing steps in base AdminRemoveDefaultVideoSimpleProductTest -->
2532
<actionGroup ref="goToCreateProductPage" stepKey="goToCreateProductPage" after="waitForProductIndexPageLoad">
2633
<argument name="product" value="BundleProduct"/>
2734
</actionGroup>
@@ -30,28 +37,28 @@
3037
</actionGroup>
3138

3239
<!-- Add two bundle items -->
33-
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="step0" after="anchor2"/>
34-
<click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="step1" after="step0"/>
35-
<waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="step2" after="step1"/>
36-
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="step3" after="step2"/>
37-
<selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('0')}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="step4" after="step3"/>
38-
<waitForElementVisible selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="step5" after="step4"/>
39-
<click selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="step6" after="step5"/>
40-
<waitForPageLoad stepKey="step7" after="step6"/>
41-
<actionGroup ref="filterProductGridBySku" stepKey="step8" after="step7">
40+
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="openBundleSection" after="addProductVideo"/>
41+
<click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption" after="openBundleSection"/>
42+
<waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" stepKey="waitForBundleTitle" after="clickAddOption"/>
43+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="{{BundleProduct.optionTitle1}}" stepKey="fillBundleTitle" after="waitForBundleTitle"/>
44+
<selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType('0')}}" userInput="{{BundleProduct.optionInputType1}}" stepKey="selectOptionBundleTitle" after="fillBundleTitle"/>
45+
<waitForElementVisible selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="waitForAddProducts" after="selectOptionBundleTitle"/>
46+
<click selector="{{AdminProductFormBundleSection.addProductsToOption}}" stepKey="clickAddProducts" after="waitForAddProducts"/>
47+
<waitForPageLoad stepKey="waitForPageLoad" after="clickAddProducts"/>
48+
<actionGroup ref="filterProductGridBySku" stepKey="filterProductGridBySku1" after="waitForPageLoad">
4249
<argument name="product" value="$$simpleProduct1$$"/>
4350
</actionGroup>
44-
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="step9" after="step8"/>
45-
<actionGroup ref="filterProductGridBySku" stepKey="step10" after="step9">
51+
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="checkOption1" after="filterProductGridBySku1"/>
52+
<actionGroup ref="filterProductGridBySku" stepKey="filterProductGridBySku2" after="checkOption1">
4653
<argument name="product" value="$$simpleProduct2$$"/>
4754
</actionGroup>
48-
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="step11" after="step10"/>
49-
<click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="step12" after="step11"/>
50-
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="step13" after="step12"/>
51-
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="step14" after="step13"/>
55+
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="checkOption2" after="filterProductGridBySku2"/>
56+
<click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="addProducts" after="checkOption2"/>
57+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillQty1" after="addProducts"/>
58+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '1')}}" userInput="{{BundleProduct.defaultQuantity}}" stepKey="fillQty2" before="saveProductForm"/>
5259

5360
<!-- Assert product in storefront product page -->
54-
<actionGroup ref="AssertProductNameAndSkuInStorefrontProductPage" stepKey="AssertProductInStorefrontProductPage" after="anchor11">
61+
<actionGroup ref="AssertProductNameAndSkuInStorefrontProductPage" stepKey="AssertProductInStorefrontProductPage">
5562
<argument name="product" value="BundleProduct"/>
5663
</actionGroup>
5764
</test>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAddDefaultVideoBundleProductTest.xml

Lines changed: 0 additions & 25 deletions
This file was deleted.

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

Lines changed: 0 additions & 44 deletions
This file was deleted.

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminAddDefaultVideoGroupedProductTest.xml

Lines changed: 0 additions & 25 deletions
This file was deleted.

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/AdminRemoveDefaultVideoBundleProductTest.xml

Lines changed: 0 additions & 25 deletions
This file was deleted.

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

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)