Skip to content

Commit 964826c

Browse files
committed
MC-23649: Flaky MFTF Test: MC-11016: Delete Bundle Dynamic Product
1 parent b9c13fd commit 964826c

File tree

2 files changed

+73
-3
lines changed

2 files changed

+73
-3
lines changed
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="AdminDeleteBundleDynamicPriceProductTest">
11+
<annotations>
12+
<features value="Bundle"/>
13+
<stories value="Delete products"/>
14+
<title value="Delete Bundle Dynamic Product"/>
15+
<description value="Admin should be able to delete a bundle dynamic product"/>
16+
<severity value="CRITICAL"/>
17+
<testCaseId value="MC-26056"/>
18+
<group value="mtf_migrated"/>
19+
<group value="bundle"/>
20+
</annotations>
21+
<before>
22+
<!-- Create category and simple product -->
23+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
24+
<createData entity="SimpleProduct2" stepKey="createSimpleProduct"/>
25+
26+
<!-- Create bundle product -->
27+
<createData entity="ApiBundleProductPriceViewRange" stepKey="createDynamicBundleProduct">
28+
<requiredEntity createDataKey="createCategory"/>
29+
</createData>
30+
<createData entity="DropDownBundleOption" stepKey="bundleOption">
31+
<requiredEntity createDataKey="createDynamicBundleProduct"/>
32+
</createData>
33+
<createData entity="ApiBundleLink" stepKey="createNewBundleLink">
34+
<requiredEntity createDataKey="createDynamicBundleProduct"/>
35+
<requiredEntity createDataKey="bundleOption"/>
36+
<requiredEntity createDataKey="createSimpleProduct"/>
37+
</createData>
38+
39+
<magentoCron groups="index" stepKey="runCronIndex"/>
40+
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCache">
41+
<argument name="tags" value=""/>
42+
</actionGroup>
43+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
44+
</before>
45+
<after>
46+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
47+
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
48+
<magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
49+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
50+
</after>
51+
<actionGroup ref="DeleteProductUsingProductGridActionGroup" stepKey="deleteBundleProductFilteredBySkuAndName">
52+
<argument name="product" value="$createDynamicBundleProduct$"/>
53+
</actionGroup>
54+
<see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="A total of 1 record(s) have been deleted." stepKey="deleteMessage"/>
55+
<!-- Verify product on Product Page -->
56+
<amOnPage url="{{StorefrontProductPage.url($createDynamicBundleProduct.custom_attributes[url_key]$)}}" stepKey="openBundleProductPage"/>
57+
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="Whoops, our bad..." stepKey="seeWhoopsMessage"/>
58+
<!-- Search for the product by sku -->
59+
<actionGroup ref="StoreFrontQuickSearchActionGroup" stepKey="searchBySku">
60+
<argument name="query" value="$createDynamicBundleProduct.sku$"/>
61+
</actionGroup>
62+
<!-- Should not see bundle product -->
63+
<dontSee userInput="$createDynamicBundleProduct.sku$" selector="{{StorefrontCatalogSearchMainSection.searchResults}}" stepKey="dontSeeProduct"/>
64+
<comment userInput="redundant action" stepKey="seeCantFindProductMessage"/>
65+
<amOnPage url="{{StorefrontCategoryPage.url($createCategory.custom_attributes[url_key]$)}}" stepKey="openCategoryPage"/>
66+
<!-- Should not see any products in category -->
67+
<dontSee userInput="$createDynamicBundleProduct.name$" selector="{{StorefrontCategoryMainSection.productsList}}" stepKey="dontSeeProductInCategory"/>
68+
<see selector="{{StorefrontCategoryMainSection.emptyProductMessage}}" userInput="We can't find products matching the selection." stepKey="seeEmptyProductMessage"/>
69+
</test>
70+
</tests>

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111
<annotations>
1212
<features value="Bundle"/>
1313
<stories value="Delete products"/>
14-
<title value="Delete Bundle Dynamic Product"/>
15-
<description value="Admin should be able to delete a bundle dynamic product"/>
14+
<title value="Deprecated. Delete Bundle Dynamic Product"/>
15+
<description value="Deprecated. Admin should be able to delete a bundle dynamic product"/>
1616
<severity value="CRITICAL"/>
1717
<testCaseId value="MC-11016"/>
1818
<group value="mtf_migrated"/>
1919
<skip>
20-
<issueId value="MC-16393"/>
20+
<issueId value="DEPRECATED">Use AdminDeleteBundleDynamicPriceProductTest instead</issueId>
2121
</skip>
2222
</annotations>
2323
<before>

0 commit comments

Comments
 (0)