Skip to content

Commit 15c9fa5

Browse files
committed
Merge branch 'MC-111-2.3.0' into MQE-1048
2 parents b65ba22 + 13b9bfa commit 15c9fa5

File tree

43 files changed

+2061
-289
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2061
-289
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="ApiBundleLink" type="bundle_link">
12+
<var key="sku" entityKey="sku" entityType="product2"/>
13+
<var key="option_id" entityKey="option_id" entityType="bundle_options"/>
14+
<var key="sku" entityKey="sku" entityType="product"/>
15+
<data key="qty">1</data>
16+
<data key="is_default">1</data>
17+
<data key="price">1.11</data>
18+
<data key="price_type">1</data>
19+
<data key="can_change_quantity">1</data>
20+
</entity>
21+
</entities>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="DropdownBundleOption" type="bundle_option">
12+
<data key="title" unique="suffix">bundle-option-dropdown</data>
13+
<data key="required">true</data>
14+
<data key="type">dropdown</data>
15+
<data key="position">1</data>
16+
<var key="sku" entityKey="sku" entityType="product2"/>
17+
</entity>
18+
<entity name="AllBundleOptions" type="bundle_options">
19+
<var key="sku" entityKey="sku" entityType="product"/>
20+
</entity>
21+
</entities>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
10+
<entity name="CustomAttributeDynamicPrice" type="custom_attribute">
11+
<data key="attribute_code">price_type</data>
12+
<data key="value">0</data>
13+
</entity>
14+
<entity name="CustomAttributeFixPrice" type="custom_attribute">
15+
<data key="attribute_code">price_type</data>
16+
<data key="value">1</data>
17+
</entity>
18+
<entity name="CustomAttributePriceView" type="custom_attribute">
19+
<data key="attribute_code">price_view</data>
20+
<data key="value">1</data>
21+
</entity>
22+
</entities>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Bundle/Data/ProductData.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,18 @@
1919
<data key="status">1</data>
2020
<data key="urlKey" unique="suffix">bundleproduct</data>
2121
</entity>
22+
<entity name="ApiBundleProduct" type="product2">
23+
<data key="name" unique="suffix">Api Bundle Product</data>
24+
<data key="sku" unique="suffix">api-bundle-product</data>
25+
<data key="type_id">bundle</data>
26+
<data key="attribute_set_id">4</data>
27+
<data key="visibility">4</data>
28+
<data key="status">1</data>
29+
<data key="urlKey" unique="suffix">api-bundle-product</data>
30+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
31+
<requiredEntity type="custom_attribute">ApiProductDescription</requiredEntity>
32+
<requiredEntity type="custom_attribute">ApiProductShortDescription</requiredEntity>
33+
<requiredEntity type="custom_attribute">CustomAttributeDynamicPrice</requiredEntity>
34+
<requiredEntity type="custom_attribute">CustomAttributePriceView</requiredEntity>
35+
</entity>
2236
</entities>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
11+
<operation name="CreateBundleLink" dataType="bundle_link" type="create" auth="adminOauth" url="/V1/bundle-products/{sku}/links/{option_id}" method="POST">
12+
<contentType>application/json</contentType>
13+
<object dataType="bundle_link" key="linkedProduct">
14+
<field key="sku">string</field>
15+
<field key="option_id">integer</field>
16+
<field key="qty">integer</field>
17+
<field key="position">integer</field>
18+
<field key="is_default">boolean</field>
19+
<field key="price">number</field>
20+
<field key="price_type">integer</field>
21+
<field key="can_change_quantity">integer</field>
22+
</object>
23+
</operation>
24+
</operations>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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+
<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
11+
<operation name="CreateBundleOption" dataType="bundle_option" type="create" auth="adminOauth" url="/V1/bundle-products/options/add" method="POST">
12+
<contentType>application/json</contentType>
13+
<object dataType="bundle_option" key="option">
14+
<field key="title">string</field>
15+
<field key="required">boolean</field>
16+
<field key="type">string</field>
17+
<field key="position">integer</field>
18+
<field key="sku">string</field>
19+
</object>
20+
</operation>
21+
</operations>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataOperation.xsd">
11+
<operation name="GetAllBundleOptions" dataType="bundle_options" type="get" auth="adminOauth" url="/V1/bundle-products/{sku}/options/all" method="GET">
12+
<contentType>application/json</contentType>
13+
</operation>
14+
</operations>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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="AdminAddDefaultVideoBundleProductTest" extends="AdminAddDefaultVideoSimpleProductTest">
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 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"/>
19+
<group value="Bundle"/>
20+
</annotations>
21+
<before>
22+
<createData entity="SimpleProduct2" stepKey="simpleProduct1"/>
23+
<createData entity="SimpleProduct2" stepKey="simpleProduct2"/>
24+
</before>
25+
<after>
26+
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
27+
<deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/>
28+
</after>
29+
30+
<!-- Create a bundle product -->
31+
<!-- Replacing steps in base AdminAddDefaultVideoSimpleProductTest -->
32+
<actionGroup ref="goToCreateProductPage" stepKey="goToCreateProductPage" after="waitForProductIndexPageLoad">
33+
<argument name="product" value="BundleProduct"/>
34+
</actionGroup>
35+
<actionGroup ref="fillProductNameAndSkuInProductForm" stepKey="fillMainProductForm" after="goToCreateProductPage">
36+
<argument name="product" value="BundleProduct"/>
37+
</actionGroup>
38+
39+
<!-- Add two bundle items -->
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">
49+
<argument name="product" value="$$simpleProduct1$$"/>
50+
</actionGroup>
51+
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="checkOption1" after="filterProductGridBySku1"/>
52+
<actionGroup ref="filterProductGridBySku" stepKey="filterProductGridBySku2" after="checkOption1">
53+
<argument name="product" value="$$simpleProduct2$$"/>
54+
</actionGroup>
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"/>
59+
60+
<!-- Assert product in storefront product page -->
61+
<actionGroup ref="AssertProductNameAndSkuInStorefrontProductPage" stepKey="AssertProductInStorefrontProductPage">
62+
<argument name="product" value="BundleProduct"/>
63+
</actionGroup>
64+
</test>
65+
</tests>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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="AdminRemoveDefaultVideoBundleProductTest" extends="AdminRemoveDefaultVideoSimpleProductTest">
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 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"/>
19+
<group value="Bundle"/>
20+
</annotations>
21+
<before>
22+
<createData entity="SimpleProduct2" stepKey="simpleProduct1"/>
23+
<createData entity="SimpleProduct2" stepKey="simpleProduct2"/>
24+
</before>
25+
<after>
26+
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
27+
<deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/>
28+
</after>
29+
30+
<!-- Create a bundle product -->
31+
<!-- Replacing steps in base AdminRemoveDefaultVideoSimpleProductTest -->
32+
<actionGroup ref="goToCreateProductPage" stepKey="goToCreateProductPage" after="waitForProductIndexPageLoad">
33+
<argument name="product" value="BundleProduct"/>
34+
</actionGroup>
35+
<actionGroup ref="fillProductNameAndSkuInProductForm" stepKey="fillMainProductForm" after="goToCreateProductPage">
36+
<argument name="product" value="BundleProduct"/>
37+
</actionGroup>
38+
39+
<!-- Add two bundle items -->
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">
49+
<argument name="product" value="$$simpleProduct1$$"/>
50+
</actionGroup>
51+
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="checkOption1" after="filterProductGridBySku1"/>
52+
<actionGroup ref="filterProductGridBySku" stepKey="filterProductGridBySku2" after="checkOption1">
53+
<argument name="product" value="$$simpleProduct2$$"/>
54+
</actionGroup>
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"/>
59+
60+
<!-- Assert product in storefront product page -->
61+
<actionGroup ref="AssertProductNameAndSkuInStorefrontProductPage" stepKey="AssertProductInStorefrontProductPage">
62+
<argument name="product" value="BundleProduct"/>
63+
</actionGroup>
64+
</test>
65+
</tests>

0 commit comments

Comments
 (0)