Skip to content

Commit f69e09e

Browse files
MC-40586: Bundle Product, added to the Wish List can not be updated using the “UPDATE WISH LIST” button under the “Add to Cart” button
1 parent cd857f9 commit f69e09e

File tree

2 files changed

+72
-1
lines changed

2 files changed

+72
-1
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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="StorefrontAddBundleProductWithOptionToWishlistTest">
12+
<annotations>
13+
<stories value="Wishlist"/>
14+
<title value="Add Dynamic Bundle Product with selected option to Wishlist"/>
15+
<description value="Add Dynamic Bundle Product with selected option to Wishlist on Frontend"/>
16+
<severity value="MAJOR"/>
17+
<testCaseId value="MC-40586"/>
18+
<group value="wishlist"/>
19+
</annotations>
20+
<before>
21+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
22+
<createData entity="_defaultCategory" stepKey="createCategory"/>
23+
<createData entity="SimpleProduct2" stepKey="simpleProduct1">
24+
<field key="price">100.00</field>
25+
</createData>
26+
<createData entity="SimpleProduct2" stepKey="simpleProduct2">
27+
<field key="price">20.00</field>
28+
</createData>
29+
<createData entity="ApiBundleProductPriceViewRange" stepKey="createBundleProduct">
30+
<requiredEntity createDataKey="createCategory"/>
31+
</createData>
32+
<createData entity="DropDownBundleOption" stepKey="createBundleOption">
33+
<requiredEntity createDataKey="createBundleProduct"/>
34+
</createData>
35+
<createData entity="ApiBundleLink" stepKey="linkOptionToProduct">
36+
<requiredEntity createDataKey="createBundleProduct"/>
37+
<requiredEntity createDataKey="createBundleOption"/>
38+
<requiredEntity createDataKey="simpleProduct1"/>
39+
</createData>
40+
<createData entity="ApiBundleLink" stepKey="linkOptionToProduct2">
41+
<requiredEntity createDataKey="createBundleProduct"/>
42+
<requiredEntity createDataKey="createBundleOption"/>
43+
<requiredEntity createDataKey="simpleProduct2"/>
44+
</createData>
45+
<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>
46+
</before>
47+
<after>
48+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
49+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
50+
<deleteData createDataKey="createBundleProduct" stepKey="deleteBundleProduct"/>
51+
<deleteData createDataKey="simpleProduct1" stepKey="deleteProduct1"/>
52+
<deleteData createDataKey="simpleProduct2" stepKey="deleteProduct2"/>
53+
</after>
54+
55+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount">
56+
<argument name="Customer" value="$$createCustomer$$"/>
57+
</actionGroup>
58+
<actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="openProductFromCategory">
59+
<argument name="productUrlKey" value="$$createBundleProduct.custom_attributes[url_key]$$"/>
60+
</actionGroup>
61+
<actionGroup ref="StorefrontSelectCustomizeAndAddToTheCartButtonActionGroup" stepKey="clickCustomizeButton"/>
62+
<selectOption selector="{{StorefrontBundledSection.dropDownOptionOneProducts($$createBundleOption.title$$)}}" userInput="$$simpleProduct1.sku$$ +$100.00" stepKey="selectOption"/>
63+
<actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="addBundleProductWithOptionToWishlist">
64+
<argument name="productVar" value="$$createBundleProduct$$"/>
65+
</actionGroup>
66+
<actionGroup ref="AssertProductIsPresentInWishListActionGroup" stepKey="assertProductWithOptionInWishList">
67+
<argument name="productName" value="$$createBundleProduct.name$$"/>
68+
<argument name="productPrice" value="$100"/>
69+
</actionGroup>
70+
</test>
71+
</tests>

app/code/Magento/Wishlist/view/frontend/web/js/add-to-wishlist.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ define([
144144
return productListWrapper.find(this.options.actionElement);
145145
}
146146

147-
return $(event.currentTarget).closest(this.options.productPageWrapper).find(this.options.actionElement);
147+
return $(this.options.actionElement);
148148
},
149149

150150
/**

0 commit comments

Comments
 (0)