Skip to content

Commit a472e83

Browse files
committed
MC-40417: Unexpected behavior when updating a Product with a Customizable Option (File) in the Wish List
1 parent c705a29 commit a472e83

File tree

1 file changed

+77
-0
lines changed

1 file changed

+77
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
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="StorefrontAddSimpleProductWithCustomizableOptionsToWishlistTest">
12+
<annotations>
13+
<stories value="Wishlist"/>
14+
<title value="Add simple product with customizable options to wishlist"/>
15+
<description value="Add simple Product with customizable options to Wishlist and verify customizable options are preserved"/>
16+
<severity value="CRITICAL"/>
17+
<useCaseId value="MC-40417"/>
18+
<group value="wishlist"/>
19+
</annotations>
20+
<before>
21+
<!-- Create Data -->
22+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
23+
<createData entity="_defaultCategory" stepKey="createCategory"/>
24+
<createData entity="SimpleProduct2" stepKey="createProduct">
25+
<field key="price">100.00</field>
26+
</createData>
27+
<updateData entity="productWithFileOption" createDataKey="createProduct" stepKey="updateProductWithOptions">
28+
<requiredEntity createDataKey="createProduct"/>
29+
</updateData>
30+
</before>
31+
<after>
32+
<!-- Delete data -->
33+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
34+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
35+
<deleteData createDataKey="createProduct" stepKey="deleteProduct1"/>
36+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
37+
</after>
38+
39+
<!-- 1. Login as a customer -->
40+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount">
41+
<argument name="Customer" value="$createCustomer$"/>
42+
</actionGroup>
43+
44+
<!-- Open Product page -->
45+
<actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="openProductFromCategory">
46+
<argument name="productUrlKey" value="$createProduct.custom_attributes[url_key]$"/>
47+
</actionGroup>
48+
<attachFile userInput="adobe-base.jpg" selector="{{StorefrontProductInfoMainSection.addLinkFileUploadFile(ProductOptionFile.title)}}" stepKey="fillUploadFile"/>
49+
50+
<!-- Add product to the wishlist -->
51+
<click selector="{{StorefrontProductInfoMainSection.productAddToWishlist}}" stepKey="addProductToWishlistClickAddToWishlist"/>
52+
<waitForElement selector="{{StorefrontCustomerWishlistSection.successMsg}}" time="30" stepKey="addProductToWishlistWaitForSuccessMessage"/>
53+
<amOnPage url="{{StorefrontCustomerWishlistPage.url}}" stepKey="amOnWishListPage"/>
54+
<waitForPageLoad stepKey="waitForWishlistPageLoad"/>
55+
56+
<!-- Assert product is present in wishlist -->
57+
<actionGroup ref="AssertProductIsPresentInWishListActionGroup" stepKey="assertProductPresent">
58+
<argument name="productName" value="$createProduct.name$"/>
59+
<argument name="productPrice" value="$109.99"/>
60+
</actionGroup>
61+
62+
<actionGroup ref="StorefrontCustomerUpdateWishlistItemActionGroup" stepKey="clickEditWishlistItem">
63+
<argument name="productName" value="$createProduct.name$"/>
64+
</actionGroup>
65+
66+
<click selector="{{StorefrontProductInfoMainSection.productAddToWishlist}}" stepKey="addProductToWishlistClickAddToWishlist2"/>
67+
<waitForElement selector="{{StorefrontCustomerWishlistSection.successMsg}}" time="30" stepKey="addProductToWishlistWaitForSuccessMessage2"/>
68+
69+
<amOnPage url="{{StorefrontCustomerWishlistPage.url}}" stepKey="amOnWishListPage2"/>
70+
<waitForPageLoad stepKey="waitForWishlistPageLoad2"/>
71+
72+
<actionGroup ref="AssertProductIsPresentInWishListActionGroup" stepKey="assertProductPresent2">
73+
<argument name="productName" value="$createProduct.name$"/>
74+
<argument name="productPrice" value="$109.99"/>
75+
</actionGroup>
76+
</test>
77+
</tests>

0 commit comments

Comments
 (0)