Skip to content

Commit 0d541f8

Browse files
ENGCOM-7101: Magento_Bundle / Remove \cache:flush\ and extract Tests to separate files #27292
- Merge Pull Request #27292 from lbajsarowicz/magento2:mftf/bundle-cache-tests - Merged commits: 1. 1e8ed89 2. 6a10b70 3. 820074d 4. 485081a 5. 7407ed5
2 parents 5ff31f6 + 7407ed5 commit 0d541f8

16 files changed

+646
-542
lines changed
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
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="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminCreateAndEditBundleProductOptionsNegativeTest">
12+
<annotations>
13+
<features value="Bundle"/>
14+
<stories value="Modify bundle product in Admin"/>
15+
<title value="Admin should be able to remove any bundle option a bundle product"/>
16+
<description value="Admin should be able to set/edit other product information when creating/editing a bundle product"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-224"/>
19+
<skip>
20+
<issueId value="https://github.com/magento/magento2/issues/25468"/>
21+
</skip>
22+
<group value="Catalog"/>
23+
</annotations>
24+
<before>
25+
<!-- Create a Website -->
26+
<createData entity="customWebsite" stepKey="createWebsite"/>
27+
28+
<!-- Create first simple product for a bundle option -->
29+
<createData entity="SimpleProduct2" stepKey="createFirstSimpleProduct"/>
30+
31+
<!-- Create second simple product for a bundle option -->
32+
<createData entity="SimpleProduct2" stepKey="createSecondSimpleProduct"/>
33+
34+
<!-- Login as admin -->
35+
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
36+
</before>
37+
<after>
38+
<!-- Delete the simple product -->
39+
<deleteData createDataKey="createFirstSimpleProduct" stepKey="deleteFirstSimpleProduct"/>
40+
41+
<!-- Delete the simple product -->
42+
<deleteData createDataKey="createSecondSimpleProduct" stepKey="deleteSecondSimpleProduct"/>
43+
44+
<!-- Delete a Website -->
45+
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite">
46+
<argument name="websiteName" value="Second Website"/>
47+
</actionGroup>
48+
49+
<!-- Log out -->
50+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
51+
</after>
52+
53+
<!-- Create new bundle product -->
54+
<actionGroup ref="GoToSpecifiedCreateProductPageActionGroup" stepKey="createBundleProduct">
55+
<argument name="productType" value="bundle"/>
56+
</actionGroup>
57+
58+
<!-- Fill all main fields -->
59+
<actionGroup ref="FillMainBundleProductFormActionGroup" stepKey="fillMainProductFields"/>
60+
61+
<!-- Add first bundle option to the product -->
62+
<actionGroup ref="AddBundleOptionWithTwoProductsActionGroup" stepKey="addFirstBundleOption">
63+
<argument name="x" value="0"/>
64+
<argument name="n" value="1"/>
65+
<argument name="prodOneSku" value="$$createFirstSimpleProduct.sku$$"/>
66+
<argument name="prodTwoSku" value="$$createSecondSimpleProduct.sku$$"/>
67+
<argument name="optionTitle" value="{{RadioButtonsOption.title}}"/>
68+
<argument name="inputType" value="{{RadioButtonsOption.type}}"/>
69+
</actionGroup>
70+
71+
<!-- Add second bundle option to the product -->
72+
<actionGroup ref="AddBundleOptionWithTwoProductsActionGroup" stepKey="addSecondBundleOption">
73+
<argument name="x" value="1"/>
74+
<argument name="n" value="2"/>
75+
<argument name="prodOneSku" value="$$createFirstSimpleProduct.sku$$"/>
76+
<argument name="prodTwoSku" value="$$createSecondSimpleProduct.sku$$"/>
77+
<argument name="optionTitle" value="{{CheckboxOption.title}}"/>
78+
<argument name="inputType" value="{{CheckboxOption.type}}"/>
79+
</actionGroup>
80+
81+
<!-- Add third bundle option to the product -->
82+
<actionGroup ref="AddBundleOptionWithTwoProductsActionGroup" stepKey="addThirdBundleOption">
83+
<argument name="x" value="2"/>
84+
<argument name="n" value="3"/>
85+
<argument name="prodOneSku" value="$$createFirstSimpleProduct.sku$$"/>
86+
<argument name="prodTwoSku" value="$$createSecondSimpleProduct.sku$$"/>
87+
<argument name="optionTitle" value="{{RadioButtonsOption.title}}"/>
88+
<argument name="inputType" value="{{RadioButtonsOption.type}}"/>
89+
</actionGroup>
90+
91+
<!-- Set product in created Website -->
92+
<actionGroup ref="AdminAssignProductInWebsiteActionGroup" stepKey="selectProductInWebsites">
93+
<argument name="website" value="$createWebsite.website[name]$"/>
94+
</actionGroup>
95+
96+
<!-- Save product form -->
97+
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveWithThreeOptions"/>
98+
99+
<!-- Open created product -->
100+
<actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForSimpleProduct">
101+
<argument name="product" value="BundleProduct"/>
102+
</actionGroup>
103+
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct">
104+
<argument name="product" value="BundleProduct"/>
105+
</actionGroup>
106+
107+
<!-- Remove second option -->
108+
<actionGroup ref="DeleteBundleOptionByIndexActionGroup" stepKey="deleteSecondOption">
109+
<argument name="deleteIndex" value="1"/>
110+
</actionGroup>
111+
112+
<!-- Save product form -->
113+
<actionGroup ref="SaveProductFormActionGroup" stepKey="clickSaveProduct"/>
114+
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveWithTwoOptions"/>
115+
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="messageYouSavedTheProductIsShown"/>
116+
117+
<!-- Delete created bundle product -->
118+
<actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteProduct">
119+
<argument name="product" value="BundleProduct"/>
120+
</actionGroup>
121+
</test>
122+
</tests>

app/code/Magento/Bundle/Test/Mftf/Test/AdminCreateAndEditBundleProductSettingsTest.xml

Lines changed: 0 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -136,117 +136,6 @@
136136
<actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="openCart"/>
137137
<dontSeeElement selector="{{StorefrontProductCartGiftOptionSection.giftOptions}}" stepKey="dontSeeGiftOptionBtn"/>
138138

139-
<!-- Delete created bundle product -->
140-
<actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteProduct">
141-
<argument name="product" value="BundleProduct"/>
142-
</actionGroup>
143-
</test>
144-
<test name="AdminCreateAndEditBundleProductOptionsNegativeTest">
145-
<annotations>
146-
<features value="Bundle"/>
147-
<stories value="Modify bundle product in Admin"/>
148-
<title value="Admin should be able to remove any bundle option a bundle product"/>
149-
<description value="Admin should be able to set/edit other product information when creating/editing a bundle product"/>
150-
<severity value="MAJOR"/>
151-
<testCaseId value="MC-224"/>
152-
<skip>
153-
<issueId value="https://github.com/magento/magento2/issues/25468"/>
154-
</skip>
155-
<group value="Catalog"/>
156-
</annotations>
157-
<before>
158-
<!-- Create a Website -->
159-
<createData entity="customWebsite" stepKey="createWebsite"/>
160-
161-
<!-- Create first simple product for a bundle option -->
162-
<createData entity="SimpleProduct2" stepKey="createFirstSimpleProduct"/>
163-
164-
<!-- Create second simple product for a bundle option -->
165-
<createData entity="SimpleProduct2" stepKey="createSecondSimpleProduct"/>
166-
167-
<!-- Login as admin -->
168-
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
169-
</before>
170-
<after>
171-
<!-- Delete the simple product -->
172-
<deleteData createDataKey="createFirstSimpleProduct" stepKey="deleteFirstSimpleProduct"/>
173-
174-
<!-- Delete the simple product -->
175-
<deleteData createDataKey="createSecondSimpleProduct" stepKey="deleteSecondSimpleProduct"/>
176-
177-
<!-- Delete a Website -->
178-
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite">
179-
<argument name="websiteName" value="Second Website"/>
180-
</actionGroup>
181-
182-
<!-- Log out -->
183-
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
184-
</after>
185-
186-
<!-- Create new bundle product -->
187-
<actionGroup ref="GoToSpecifiedCreateProductPageActionGroup" stepKey="createBundleProduct">
188-
<argument name="productType" value="bundle"/>
189-
</actionGroup>
190-
191-
<!-- Fill all main fields -->
192-
<actionGroup ref="FillMainBundleProductFormActionGroup" stepKey="fillMainProductFields"/>
193-
194-
<!-- Add first bundle option to the product -->
195-
<actionGroup ref="AddBundleOptionWithTwoProductsActionGroup" stepKey="addFirstBundleOption">
196-
<argument name="x" value="0"/>
197-
<argument name="n" value="1"/>
198-
<argument name="prodOneSku" value="$$createFirstSimpleProduct.sku$$"/>
199-
<argument name="prodTwoSku" value="$$createSecondSimpleProduct.sku$$"/>
200-
<argument name="optionTitle" value="{{RadioButtonsOption.title}}"/>
201-
<argument name="inputType" value="{{RadioButtonsOption.type}}"/>
202-
</actionGroup>
203-
204-
<!-- Add second bundle option to the product -->
205-
<actionGroup ref="AddBundleOptionWithTwoProductsActionGroup" stepKey="addSecondBundleOption">
206-
<argument name="x" value="1"/>
207-
<argument name="n" value="2"/>
208-
<argument name="prodOneSku" value="$$createFirstSimpleProduct.sku$$"/>
209-
<argument name="prodTwoSku" value="$$createSecondSimpleProduct.sku$$"/>
210-
<argument name="optionTitle" value="{{CheckboxOption.title}}"/>
211-
<argument name="inputType" value="{{CheckboxOption.type}}"/>
212-
</actionGroup>
213-
214-
<!-- Add third bundle option to the product -->
215-
<actionGroup ref="AddBundleOptionWithTwoProductsActionGroup" stepKey="addThirdBundleOption">
216-
<argument name="x" value="2"/>
217-
<argument name="n" value="3"/>
218-
<argument name="prodOneSku" value="$$createFirstSimpleProduct.sku$$"/>
219-
<argument name="prodTwoSku" value="$$createSecondSimpleProduct.sku$$"/>
220-
<argument name="optionTitle" value="{{RadioButtonsOption.title}}"/>
221-
<argument name="inputType" value="{{RadioButtonsOption.type}}"/>
222-
</actionGroup>
223-
224-
<!-- Set product in created Website -->
225-
<actionGroup ref="AdminAssignProductInWebsiteActionGroup" stepKey="selectProductInWebsites">
226-
<argument name="website" value="$createWebsite.website[name]$"/>
227-
</actionGroup>
228-
229-
<!-- Save product form -->
230-
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveWithThreeOptions"/>
231-
232-
<!-- Open created product -->
233-
<actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForSimpleProduct">
234-
<argument name="product" value="BundleProduct"/>
235-
</actionGroup>
236-
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct">
237-
<argument name="product" value="BundleProduct"/>
238-
</actionGroup>
239-
240-
<!-- Remove second option -->
241-
<actionGroup ref="DeleteBundleOptionByIndexActionGroup" stepKey="deleteSecondOption">
242-
<argument name="deleteIndex" value="1"/>
243-
</actionGroup>
244-
245-
<!-- Save product form -->
246-
<actionGroup ref="SaveProductFormActionGroup" stepKey="clickSaveProduct"/>
247-
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveWithTwoOptions"/>
248-
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="messageYouSavedTheProductIsShown"/>
249-
250139
<!-- Delete created bundle product -->
251140
<actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteProduct">
252141
<argument name="product" value="BundleProduct"/>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdvanceCatalogSearchBundleByDescriptionMysqlTest" extends="AdvanceCatalogSearchSimpleProductByDescriptionTest">
12+
<annotations>
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 description using the MySQL search engine"/>
16+
<description value="Guest customer should be able to advance search Bundle product with product description using the MySQL search engine"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-20473"/>
19+
<group value="Bundle"/>
20+
<group value="SearchEngineMysql"/>
21+
</annotations>
22+
<before>
23+
<createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/>
24+
<createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/>
25+
<createData entity="ApiBundleProduct" stepKey="product"/>
26+
<createData entity="DropDownBundleOption" stepKey="bundleOption">
27+
<requiredEntity createDataKey="product"/>
28+
</createData>
29+
<createData entity="ApiBundleLink" stepKey="createBundleLink1">
30+
<requiredEntity createDataKey="product"/>
31+
<requiredEntity createDataKey="bundleOption"/>
32+
<requiredEntity createDataKey="simple1"/>
33+
</createData>
34+
<createData entity="ApiBundleLink" stepKey="createBundleLink2">
35+
<requiredEntity createDataKey="product"/>
36+
<requiredEntity createDataKey="bundleOption"/>
37+
<requiredEntity createDataKey="simple2"/>
38+
</createData>
39+
40+
<magentoCron stepKey="runCronReindex" groups="index"/>
41+
</before>
42+
<after>
43+
<deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
44+
<deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/>
45+
</after>
46+
</test>
47+
</tests>
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdvanceCatalogSearchBundleByDescriptionTest" extends="AdvanceCatalogSearchSimpleProductByDescriptionTest">
12+
<annotations>
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 description"/>
16+
<description value="Guest customer should be able to advance search Bundle product with product description"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-242"/>
19+
<group value="Bundle"/>
20+
<group value="SearchEngineElasticsearch"/>
21+
</annotations>
22+
<before>
23+
<createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/>
24+
<createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/>
25+
<createData entity="ApiBundleProduct" stepKey="product"/>
26+
<createData entity="DropDownBundleOption" stepKey="bundleOption">
27+
<requiredEntity createDataKey="product"/>
28+
</createData>
29+
<createData entity="ApiBundleLink" stepKey="createBundleLink1">
30+
<requiredEntity createDataKey="product"/>
31+
<requiredEntity createDataKey="bundleOption"/>
32+
<requiredEntity createDataKey="simple1"/>
33+
</createData>
34+
<createData entity="ApiBundleLink" stepKey="createBundleLink2">
35+
<requiredEntity createDataKey="product"/>
36+
<requiredEntity createDataKey="bundleOption"/>
37+
<requiredEntity createDataKey="simple2"/>
38+
</createData>
39+
40+
<magentoCron stepKey="runCronReindex" groups="index"/>
41+
</before>
42+
<after>
43+
<deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
44+
<deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/>
45+
</after>
46+
<see userInput="3 items" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.itemFound}}" stepKey="see"/>
47+
<see userInput="$$product.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('1')}}" stepKey="seeProductName"/>
48+
<see userInput="$$simple1.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('2')}}" stepKey="seeSimple1ProductName"/>
49+
<see userInput="$$simple2.name$$" selector="{{StorefrontCatalogSearchAdvancedResultMainSection.nthProductName('3')}}" stepKey="seeSimple2ProductName"/>
50+
</test>
51+
</tests>
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdvanceCatalogSearchBundleByNameMysqlTest" extends="AdvanceCatalogSearchSimpleProductByNameTest">
12+
<annotations>
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 using the MySQL search engine"/>
16+
<description value="Guest customer should be able to advance search Bundle product with product name using the MySQL search engine"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-20472"/>
19+
<group value="Bundle"/>
20+
<group value="SearchEngineMysql"/>
21+
</annotations>
22+
<before>
23+
<createData entity="ApiProductWithDescription" stepKey="simple1" before="simple2"/>
24+
<createData entity="ApiProductWithDescription" stepKey="simple2" before="product"/>
25+
<createData entity="ApiBundleProduct" stepKey="product"/>
26+
<createData entity="DropDownBundleOption" stepKey="bundleOption">
27+
<requiredEntity createDataKey="product"/>
28+
</createData>
29+
<createData entity="ApiBundleLink" stepKey="createBundleLink1">
30+
<requiredEntity createDataKey="product"/>
31+
<requiredEntity createDataKey="bundleOption"/>
32+
<requiredEntity createDataKey="simple1"/>
33+
</createData>
34+
<createData entity="ApiBundleLink" stepKey="createBundleLink2">
35+
<requiredEntity createDataKey="product"/>
36+
<requiredEntity createDataKey="bundleOption"/>
37+
<requiredEntity createDataKey="simple2"/>
38+
</createData>
39+
40+
<magentoCron stepKey="runCronReindex" groups="index"/>
41+
</before>
42+
<after>
43+
<deleteData createDataKey="simple1" stepKey="deleteSimple1" before="deleteSimple2"/>
44+
<deleteData createDataKey="simple2" stepKey="deleteSimple2" before="delete"/>
45+
</after>
46+
</test>
47+
</tests>

0 commit comments

Comments
 (0)