Skip to content

Commit 7094961

Browse files
committed
MC-141: Guest customer should be able to advance search grouped product with product name
MC-146: Guest customer should be able to advance search grouped product with product sku MC-282: Guest customer should be able to advance search grouped product with product description MC-283: Guest customer should be able to advance search grouped product with product short description MC-284: Guest customer should be able to advance search grouped product with product price - added mftf tests
1 parent b6cd741 commit 7094961

File tree

10 files changed

+359
-6
lines changed

10 files changed

+359
-6
lines changed

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product-meta.xml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,34 @@
118118
<operation name="deleteProduct2" dataType="product2" type="delete" auth="adminOauth" url="/V1/products/{sku}" method="DELETE">
119119
<contentType>application/json</contentType>
120120
</operation>
121+
<!-- Data type product3 is to work around MQE-1035 -->
122+
<operation name="CreateProduct3" dataType="product3" type="create" auth="adminOauth" url="/V1/products" method="POST">
123+
<contentType>application/json</contentType>
124+
<object dataType="product3" key="product">
125+
<field key="sku">string</field>
126+
<field key="name">string</field>
127+
<field key="attribute_set_id">integer</field>
128+
<field key="price">number</field>
129+
<field key="status">integer</field>
130+
<field key="visibility">integer</field>
131+
<field key="type_id">string</field>
132+
<field key="created_at">string</field>
133+
<field key="updated_at">string</field>
134+
<field key="weight">integer</field>
135+
<field key="extension_attributes">product_extension_attribute</field>
136+
<array key="product_links">
137+
<value>product_link</value>
138+
</array>
139+
<array key="custom_attributes">
140+
<value>custom_attribute_array</value>
141+
</array>
142+
<array key="options">
143+
<value>product_option</value>
144+
</array>
145+
</object>
146+
</operation>
147+
<!-- Data type product3 is to work around MQE-1035 -->
148+
<operation name="DeleteProduct3" dataType="product3" type="delete" auth="adminOauth" url="/V1/products/{sku}" method="DELETE">
149+
<contentType>application/json</contentType>
150+
</operation>
121151
</operations>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Metadata/product_link-meta.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@
1414
<field key="linked_product_sku">string</field>
1515
<field key="linked_product_type">string</field>
1616
<field key="position">integer</field>
17-
<array key="extension_attributes">
18-
<value>product_link_extension_attribute</value>
19-
</array>
17+
<object key="extension_attributes" dataType="product_link_extension_attribute">
18+
<field key="qty">integer</field>
19+
</object>
2020
</operation>
2121
<operation name="UpdateProductLink" dataType="product_link" type="update">
2222
<field key="sku">string</field>
2323
<field key="link_type">string</field>
2424
<field key="linked_product_sku">string</field>
2525
<field key="linked_product_type">string</field>
2626
<field key="position">integer</field>
27-
<array key="extension_attributes">
28-
<value>product_link_extension_attribute</value>
29-
</array>
27+
<object key="extension_attributes" dataType="product_link_extension_attribute">
28+
<field key="qty">integer</field>
29+
</object>
3030
</operation>
3131
</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="CreateProductLinks" dataType="product_links" type="create" auth="adminOauth" url="/V1/products/{sku}/links" method="POST">
12+
<contentType>application/json</contentType>
13+
<array key="items">
14+
<value>product_link</value>
15+
</array>
16+
</operation>
17+
<operation name="UpdateProductLinks" dataType="product_links" type="update" auth="adminOauth" url="/V1/products/{sku}/links" method="PUT">
18+
<contentType>application/json</contentType>
19+
<field key="entity">product_link</field>
20+
</operation>
21+
</operations>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11+
<section name="AdminProductContentSection">
12+
<element name="sectionHeader" type="button" selector="div[data-index='content']" timeout="30"/>
13+
<element name="descriptionTextArea" type="textarea" selector="#product_form_description"/>
14+
<element name="shortDescriptionTextArea" type="textarea" selector="#product_form_short_description"/>
15+
</section>
16+
</sections>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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="AdvanceCatalogSearchGroupedProductByNameTest" extends="AdvanceCatalogSearchSimpleProductByNameTest">
12+
<annotations>
13+
<features value="CatalogSearch"/>
14+
<stories value="Advanced Catalog Product Search for all product types"/>
15+
<title value="Guest customer should be able to advance search Grouped product with product name"/>
16+
<description value="Guest customer should be able to advance search Grouped product with product name"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-141"/>
19+
<group value="CatalogSearch"/>
20+
</annotations>
21+
</test>
22+
<test name="AdvanceCatalogSearchGroupedProductBySkuTest" extends="AdvanceCatalogSearchSimpleProductByNameTest">
23+
<annotations>
24+
<features value="CatalogSearch"/>
25+
<stories value="Advanced Catalog Product Search for all product types"/>
26+
<title value="Guest customer should be able to advance search Grouped product with product sku"/>
27+
<description value="Guest customer should be able to advance search Grouped product with product sku"/>
28+
<severity value="MAJOR"/>
29+
<testCaseId value="MC-146"/>
30+
<group value="CatalogSearch"/>
31+
</annotations>
32+
<actionGroup ref="StorefrontAdvancedCatalogSearchByProductSkuActionGroup" stepKey="search">
33+
<argument name="sku" value="$$createProductOne.sku$$"/>
34+
</actionGroup>
35+
</test>
36+
<test name="AdvanceCatalogSearchGroupedProductByDescriptionTest" extends="AdvanceCatalogSearchSimpleProductByNameTest">
37+
<annotations>
38+
<features value="CatalogSearch"/>
39+
<stories value="Advanced Catalog Product Search for all product types"/>
40+
<title value="Guest customer should be able to advance search Grouped product with product description"/>
41+
<description value="Guest customer should be able to advance search Grouped product with product description"/>
42+
<severity value="MAJOR"/>
43+
<testCaseId value="MC-282"/>
44+
<group value="CatalogSearch"/>
45+
</annotations>
46+
<actionGroup ref="StorefrontAdvancedCatalogSearchByDescriptionActionGroup" stepKey="search">
47+
<argument name="description" value="$$createProductOne.custom_attributes[description]$$"/>
48+
</actionGroup>
49+
</test>
50+
<test name="AdvanceCatalogSearchGroupedProductByShortDescriptionTest" extends="AdvanceCatalogSearchSimpleProductByNameTest">
51+
<annotations>
52+
<features value="CatalogSearch"/>
53+
<stories value="Advanced Catalog Product Search for all product types"/>
54+
<title value="Guest customer should be able to advance search Grouped product with product short description"/>
55+
<description value="Guest customer should be able to advance search Grouped product with product short description"/>
56+
<severity value="MAJOR"/>
57+
<testCaseId value="MC-283"/>
58+
<group value="CatalogSearch"/>
59+
</annotations>
60+
<actionGroup ref="StorefrontAdvancedCatalogSearchByShortDescriptionActionGroup" stepKey="search">
61+
<argument name="shortDescription" value="$$createProductOne.custom_attributes[short_description]$$"/>
62+
</actionGroup>
63+
</test>
64+
<test name="AdvanceCatalogSearchGroupedProductByPriceTest" extends="AdvanceCatalogSearchSimpleProductByNameTest">
65+
<annotations>
66+
<features value="CatalogSearch"/>
67+
<stories value="Advanced Catalog Product Search for all product types"/>
68+
<title value="Guest customer should be able to advance search Grouped product with product price"/>
69+
<description value="Guest customer should be able to advance search Grouped product with product price"/>
70+
<severity value="MAJOR"/>
71+
<testCaseId value="MC-284"/>
72+
<group value="CatalogSearch"/>
73+
</annotations>
74+
<actionGroup ref="StorefrontAdvancedCatalogSearchByProductNameAndPriceActionGroup" stepKey="search">
75+
<argument name="name" value="$$createProductOne.name$$"/>
76+
<argument name="priceFrom" value="$$simple1.price$$"/>
77+
<argument name="priceTo" value="$$simple1.price$$"/>
78+
</actionGroup>
79+
</test>
80+
</tests>

dev/tests/acceptance/tests/functional/Magento/FunctionalTest/GroupedProduct/Data/GroupedProductData.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,15 @@
1717
<data key="urlKey" unique="suffix">groupedproduct</data>
1818
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
1919
</entity>
20+
<entity name="ApiGroupedProduct" type="product3">
21+
<data key="sku" unique="suffix">api-grouped-product</data>
22+
<data key="type_id">grouped</data>
23+
<data key="attribute_set_id">4</data>
24+
<data key="name" unique="suffix">Api Grouped Product</data>
25+
<data key="status">1</data>
26+
<data key="urlKey" unique="suffix">api-grouped-product</data>
27+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
28+
<requiredEntity type="custom_attribute_array">ApiProductDescription</requiredEntity>
29+
<requiredEntity type="custom_attribute_array">ApiProductShortDescription</requiredEntity>
30+
</entity>
2031
</entities>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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="ProductLinkSimple1" type="product_link">
12+
<var key="sku" entityKey="sku" entityType="product3"/>
13+
<var key="linked_product_sku" entityKey="sku" entityType="product"/>
14+
<data key="link_type">associated</data>
15+
<data key="linked_product_type">simple</data>
16+
<data key="position">1</data>
17+
<requiredEntity type="product_link_extension_attribute">Qty1000</requiredEntity>
18+
</entity>
19+
<entity name="ProductLinkSimple2" type="product_link">
20+
<var key="sku" entityKey="sku" entityType="product3"/>
21+
<var key="linked_product_sku" entityKey="sku" entityType="product"/>
22+
<data key="link_type">associated</data>
23+
<data key="linked_product_type">simple</data>
24+
<data key="position">2</data>
25+
<requiredEntity type="product_link_extension_attribute">Qty1000</requiredEntity>
26+
</entity>
27+
</entities>
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+
<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="Qty1000" type="product_link_extension_attribute">
12+
<data key="qty">1000</data>
13+
</entity>
14+
</entities>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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="OneSimpleProductLink" type="product_links">
12+
<requiredEntity type="product_link">ProductLinkSimple1</requiredEntity>
13+
</entity>
14+
<entity name="OneMoreSimpleProductLink" type="product_links">
15+
<requiredEntity type="product_link">ProductLinkSimple2</requiredEntity>
16+
</entity>
17+
<entity name="TwoSimpleProductLinks" type="product_links">
18+
<array key="items">
19+
<item>ProductLinkSimple1</item>
20+
<item>ProductLinkSimple2</item>
21+
</array>
22+
</entity>
23+
</entities>

0 commit comments

Comments
 (0)