Skip to content

Commit 13b9bfa

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 - updated mftf tests
1 parent 7094961 commit 13b9bfa

14 files changed

+480
-558
lines changed

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

Lines changed: 98 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -10,142 +10,201 @@
1010
xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd">
1111
<test name="AdvanceCatalogSearchBundleByNameTest" extends="AdvanceCatalogSearchSimpleProductByNameTest">
1212
<annotations>
13-
<group value="Catalog"/>
13+
<features value="Bundle"/>
14+
<stories value="Advanced Catalog Product Search for all product types"/>
15+
<title value="Guest customer should be able to advance search Bundle product with product name"/>
16+
<description value="Guest customer should be able to advance search Bundle product with product name"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-139"/>
19+
<group value="Bundle"/>
1420
</annotations>
1521
<before>
1622
<createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/>
17-
<createData entity="ApiProductWithDescription" stepKey="simple2" before="createProductOne"/>
18-
<createData entity="ApiBundleProduct" stepKey="createProductOne"/>
23+
<createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/>
24+
<createData entity="ApiBundleProduct" stepKey="product"/>
1925
<createData entity="DropdownBundleOption" stepKey="bundleOption">
20-
<requiredEntity createDataKey="createProductOne"/>
26+
<requiredEntity createDataKey="product"/>
2127
</createData>
2228
<getData entity="AllBundleOptions" index="0" stepKey="getBundleOption">
23-
<requiredEntity createDataKey="createProductOne"/>
29+
<requiredEntity createDataKey="product"/>
2430
</getData>
2531
<createData entity="ApiBundleLink" stepKey="createBundleLink1">
26-
<requiredEntity createDataKey="createProductOne"/>
32+
<requiredEntity createDataKey="product"/>
2733
<requiredEntity createDataKey="getBundleOption"/>
2834
<requiredEntity createDataKey="simple1"/>
2935
</createData>
3036
<createData entity="ApiBundleLink" stepKey="createBundleLink2">
31-
<requiredEntity createDataKey="createProductOne"/>
37+
<requiredEntity createDataKey="product"/>
3238
<requiredEntity createDataKey="getBundleOption"/>
3339
<requiredEntity createDataKey="simple2"/>
3440
</createData>
3541
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
3642
<magentoCLI command="cache:flush" stepKey="flushCache"/>
3743
</before>
44+
<after>
45+
<deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
46+
<deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/>
47+
</after>
3848
</test>
39-
<test name="AdvanceCatalogSearchBundleBySkuTest" extends="AdvanceCatalogSearchSimpleProductByNameTest">
49+
<test name="AdvanceCatalogSearchBundleBySkuTest" extends="AdvanceCatalogSearchSimpleProductBySkuTest">
4050
<annotations>
41-
<group value="Catalog"/>
51+
<features value="Bundle"/>
52+
<stories value="Advanced Catalog Product Search for all product types"/>
53+
<title value="Guest customer should be able to advance search Bundle product with product sku"/>
54+
<description value="Guest customer should be able to advance search Bundle product with product sku"/>
55+
<severity value="MAJOR"/>
56+
<testCaseId value="MC-143"/>
57+
<group value="Bundle"/>
4258
</annotations>
4359
<before>
4460
<createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/>
45-
<createData entity="ApiProductWithDescription" stepKey="simple2" before="createProductOne"/>
46-
<createData entity="ApiBundleProduct" stepKey="createProductOne"/>
61+
<createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/>
62+
<createData entity="ApiBundleProduct" stepKey="product"/>
4763
<createData entity="DropdownBundleOption" stepKey="bundleOption">
48-
<requiredEntity createDataKey="createProductOne"/>
64+
<requiredEntity createDataKey="product"/>
4965
</createData>
5066
<getData entity="AllBundleOptions" index="0" stepKey="getBundleOption">
51-
<requiredEntity createDataKey="createProductOne"/>
67+
<requiredEntity createDataKey="product"/>
5268
</getData>
5369
<createData entity="ApiBundleLink" stepKey="createBundleLink1">
54-
<requiredEntity createDataKey="createProductOne"/>
70+
<requiredEntity createDataKey="product"/>
5571
<requiredEntity createDataKey="getBundleOption"/>
5672
<requiredEntity createDataKey="simple1"/>
5773
</createData>
5874
<createData entity="ApiBundleLink" stepKey="createBundleLink2">
59-
<requiredEntity createDataKey="createProductOne"/>
75+
<requiredEntity createDataKey="product"/>
6076
<requiredEntity createDataKey="getBundleOption"/>
6177
<requiredEntity createDataKey="simple2"/>
6278
</createData>
6379
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
6480
<magentoCLI command="cache:flush" stepKey="flushCache"/>
6581
</before>
82+
<after>
83+
<deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
84+
<deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/>
85+
</after>
6686
</test>
67-
<test name="AdvanceCatalogSearchBundleByDescriptionTest" extends="AdvanceCatalogSearchSimpleProductByNameTest">
87+
<test name="AdvanceCatalogSearchBundleByDescriptionTest" extends="AdvanceCatalogSearchSimpleProductByDescriptionTest">
6888
<annotations>
69-
<group value="Catalog"/>
89+
<features value="Bundle"/>
90+
<stories value="Advanced Catalog Product Search for all product types"/>
91+
<title value="Guest customer should be able to advance search Bundle product with product description"/>
92+
<description value="Guest customer should be able to advance search Bundle product with product description"/>
93+
<severity value="MAJOR"/>
94+
<testCaseId value="MC-242"/>
95+
<group value="Bundle"/>
7096
</annotations>
7197
<before>
7298
<createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/>
73-
<createData entity="ApiProductWithDescription" stepKey="simple2" before="createProductOne"/>
74-
<createData entity="ApiBundleProduct" stepKey="createProductOne"/>
99+
<createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/>
100+
<createData entity="ApiBundleProduct" stepKey="product"/>
75101
<createData entity="DropdownBundleOption" stepKey="bundleOption">
76-
<requiredEntity createDataKey="createProductOne"/>
102+
<requiredEntity createDataKey="product"/>
77103
</createData>
78104
<getData entity="AllBundleOptions" index="0" stepKey="getBundleOption">
79-
<requiredEntity createDataKey="createProductOne"/>
105+
<requiredEntity createDataKey="product"/>
80106
</getData>
81107
<createData entity="ApiBundleLink" stepKey="createBundleLink1">
82-
<requiredEntity createDataKey="createProductOne"/>
108+
<requiredEntity createDataKey="product"/>
83109
<requiredEntity createDataKey="getBundleOption"/>
84110
<requiredEntity createDataKey="simple1"/>
85111
</createData>
86112
<createData entity="ApiBundleLink" stepKey="createBundleLink2">
87-
<requiredEntity createDataKey="createProductOne"/>
113+
<requiredEntity createDataKey="product"/>
88114
<requiredEntity createDataKey="getBundleOption"/>
89115
<requiredEntity createDataKey="simple2"/>
90116
</createData>
91117
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
92118
<magentoCLI command="cache:flush" stepKey="flushCache"/>
93119
</before>
120+
<after>
121+
<deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
122+
<deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/>
123+
</after>
94124
</test>
95-
<test name="AdvanceCatalogSearchBundleByShortDescriptionTest" extends="AdvanceCatalogSearchSimpleProductByNameTest">
125+
<test name="AdvanceCatalogSearchBundleByShortDescriptionTest" extends="AdvanceCatalogSearchSimpleProductByShortDescriptionTest">
96126
<annotations>
97-
<group value="Catalog"/>
127+
<features value="Bundle"/>
128+
<stories value="Advanced Catalog Product Search for all product types"/>
129+
<title value="Guest customer should be able to advance search Bundle product with product short description"/>
130+
<description value="Guest customer should be able to advance search Bundle product with product short description"/>
131+
<severity value="MAJOR"/>
132+
<testCaseId value="MC-250"/>
133+
<group value="Bundle"/>
98134
</annotations>
99135
<before>
100136
<createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/>
101-
<createData entity="ApiProductWithDescription" stepKey="simple2" before="createProductOne"/>
102-
<createData entity="ApiBundleProduct" stepKey="createProductOne"/>
137+
<createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/>
138+
<createData entity="ApiBundleProduct" stepKey="product"/>
103139
<createData entity="DropdownBundleOption" stepKey="bundleOption">
104-
<requiredEntity createDataKey="createProductOne"/>
140+
<requiredEntity createDataKey="product"/>
105141
</createData>
106142
<getData entity="AllBundleOptions" index="0" stepKey="getBundleOption">
107-
<requiredEntity createDataKey="createProductOne"/>
143+
<requiredEntity createDataKey="product"/>
108144
</getData>
109145
<createData entity="ApiBundleLink" stepKey="createBundleLink1">
110-
<requiredEntity createDataKey="createProductOne"/>
146+
<requiredEntity createDataKey="product"/>
111147
<requiredEntity createDataKey="getBundleOption"/>
112148
<requiredEntity createDataKey="simple1"/>
113149
</createData>
114150
<createData entity="ApiBundleLink" stepKey="createBundleLink2">
115-
<requiredEntity createDataKey="createProductOne"/>
151+
<requiredEntity createDataKey="product"/>
116152
<requiredEntity createDataKey="getBundleOption"/>
117153
<requiredEntity createDataKey="simple2"/>
118154
</createData>
119155
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
120156
<magentoCLI command="cache:flush" stepKey="flushCache"/>
121157
</before>
158+
<after>
159+
<deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
160+
<deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/>
161+
</after>
122162
</test>
123-
<test name="AdvanceCatalogSearchBundleByPriceTest" extends="AdvanceCatalogSearchSimpleProductByNameTest">
163+
<test name="AdvanceCatalogSearchBundleByPriceTest" extends="AdvanceCatalogSearchSimpleProductByPriceTest">
124164
<annotations>
125-
<group value="Catalog"/>
165+
<features value="Bundle"/>
166+
<stories value="Advanced Catalog Product Search for all product types"/>
167+
<title value="Guest customer should be able to advance search Bundle product with product price"/>
168+
<description value="Guest customer should be able to advance search Bundle product with product price"/>
169+
<severity value="MAJOR"/>
170+
<testCaseId value="MC-251"/>
171+
<group value="Bundle"/>
126172
</annotations>
127173
<before>
128174
<createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/>
129-
<createData entity="ApiProductWithDescription" stepKey="simple2" before="createProductOne"/>
130-
<createData entity="ApiBundleProduct" stepKey="createProductOne"/>
175+
<createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/>
176+
<createData entity="ApiBundleProduct" stepKey="product"/>
131177
<createData entity="DropdownBundleOption" stepKey="bundleOption">
132-
<requiredEntity createDataKey="createProductOne"/>
178+
<requiredEntity createDataKey="product"/>
133179
</createData>
134180
<getData entity="AllBundleOptions" index="0" stepKey="getBundleOption">
135-
<requiredEntity createDataKey="createProductOne"/>
181+
<requiredEntity createDataKey="product"/>
136182
</getData>
137183
<createData entity="ApiBundleLink" stepKey="createBundleLink1">
138-
<requiredEntity createDataKey="createProductOne"/>
184+
<requiredEntity createDataKey="product"/>
139185
<requiredEntity createDataKey="getBundleOption"/>
140186
<requiredEntity createDataKey="simple1"/>
141187
</createData>
142188
<createData entity="ApiBundleLink" stepKey="createBundleLink2">
143-
<requiredEntity createDataKey="createProductOne"/>
189+
<requiredEntity createDataKey="product"/>
144190
<requiredEntity createDataKey="getBundleOption"/>
145191
<requiredEntity createDataKey="simple2"/>
146192
</createData>
193+
<getData entity="GetProduct" stepKey="arg1">
194+
<requiredEntity createDataKey="product"/>
195+
</getData>
196+
<getData entity="GetProduct" stepKey="arg2">
197+
<requiredEntity createDataKey="simple1"/>
198+
</getData>
199+
<getData entity="GetProduct" stepKey="arg3">
200+
<requiredEntity createDataKey="simple2"/>
201+
</getData>
147202
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
148203
<magentoCLI command="cache:flush" stepKey="flushCache"/>
149204
</before>
205+
<after>
206+
<deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
207+
<deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/>
208+
</after>
150209
</test>
151210
</tests>

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,4 +281,29 @@
281281
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
282282
<requiredEntity type="custom_attribute_array">ApiProductNewsFromDate</requiredEntity>
283283
</entity>
284+
<entity name="GetProduct" type="product">
285+
<var key="sku" entityKey="sku" entityType="product"/>
286+
</entity>
287+
<entity name="GetProduct2" type="product2">
288+
<var key="sku" entityKey="sku" entityType="product2"/>
289+
</entity>
290+
<entity name="GetProduct3" type="product3">
291+
<var key="sku" entityKey="sku" entityType="product3"/>
292+
</entity>
293+
<entity name="ApiSimplePrice1" type="product">
294+
<data key="sku" unique="suffix">api-simple-product</data>
295+
<data key="type_id">simple</data>
296+
<data key="attribute_set_id">4</data>
297+
<data key="visibility">4</data>
298+
<data key="name" unique="suffix">Api Simple Product</data>
299+
<data key="price">1.00</data>
300+
</entity>
301+
<entity name="ApiSimplePrice100" type="product">
302+
<data key="sku" unique="suffix">api-simple-product</data>
303+
<data key="type_id">simple</data>
304+
<data key="attribute_set_id">4</data>
305+
<data key="visibility">4</data>
306+
<data key="name" unique="suffix">Api Simple Product</data>
307+
<data key="price">100.00</data>
308+
</entity>
284309
</entities>

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

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,10 @@
6060
</object>
6161
<field key="saveOptions">boolean</field>
6262
</operation>
63-
<operation name="deleteProduct" dataType="product" type="delete" auth="adminOauth" url="/V1/products/{sku}" method="DELETE">
63+
<operation name="DeleteProduct" dataType="product" type="delete" auth="adminOauth" url="/V1/products/{sku}" method="DELETE">
64+
<contentType>application/json</contentType>
65+
</operation>
66+
<operation name="GetProduct" dataType="product" type="get" auth="adminOauth" url="/V1/products/{sku}" method="GET">
6467
<contentType>application/json</contentType>
6568
</operation>
6669
<operation name="CreateProduct2" dataType="product2" type="create" auth="adminOauth" url="/V1/products" method="POST">
@@ -115,7 +118,10 @@
115118
</object>
116119
<field key="saveOptions">boolean</field>
117120
</operation>
118-
<operation name="deleteProduct2" dataType="product2" type="delete" auth="adminOauth" url="/V1/products/{sku}" method="DELETE">
121+
<operation name="DeleteProduct2" dataType="product2" type="delete" auth="adminOauth" url="/V1/products/{sku}" method="DELETE">
122+
<contentType>application/json</contentType>
123+
</operation>
124+
<operation name="GetProduct2" dataType="product2" type="get" auth="adminOauth" url="/V1/products/{sku}" method="GET">
119125
<contentType>application/json</contentType>
120126
</operation>
121127
<!-- Data type product3 is to work around MQE-1035 -->
@@ -148,4 +154,7 @@
148154
<operation name="DeleteProduct3" dataType="product3" type="delete" auth="adminOauth" url="/V1/products/{sku}" method="DELETE">
149155
<contentType>application/json</contentType>
150156
</operation>
157+
<operation name="GetProduct3" dataType="product3" type="get" auth="adminOauth" url="/V1/products/{sku}" method="GET">
158+
<contentType>application/json</contentType>
159+
</operation>
151160
</operations>

0 commit comments

Comments
 (0)