Skip to content

Commit 7096d82

Browse files
committed
Sharing Wishlist with more than allowed emails qty test
1 parent bb176b8 commit 7096d82

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
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="StorefrontShareWishlistWithMoreThanMaximumAllowedEmailsQtyTest">
12+
<annotations>
13+
<features value="Wishlist"/>
14+
<stories value="Sharing wishlist with more than Maximum Allowed Emails qty"/>
15+
<title value="Sharing wishlist with more than Maximum Allowed Emails qty"/>
16+
<description value="Customer should not have a possibility share wishlist with more than maximum allowed emails qty"/>
17+
<group value="wishlist"/>
18+
<group value="configuration"/>
19+
</annotations>
20+
<before>
21+
<magentoCLI command="config:set wishlist/email/number_limit 1" stepKey="changeEmailsQtyLimit"/>
22+
<magentoCLI command="cache:clean" stepKey="cleanCache"/>
23+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
24+
<createData entity="SimpleProduct" stepKey="createProduct">
25+
<requiredEntity createDataKey="createCategory"/>
26+
</createData>
27+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
28+
</before>
29+
<after>
30+
<magentoCLI command="config:set wishlist/email/number_limit 10" stepKey="returnDefaultValue"/>
31+
<magentoCLI command="cache:clean" stepKey="cacheClean"/>
32+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
33+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
34+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/>
35+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
36+
</after>
37+
38+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount">
39+
<argument name="Customer" value="$createCustomer$"/>
40+
</actionGroup>
41+
<actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="openProductPage">
42+
<argument name="productUrlKey" value="$$createProduct.custom_attributes[url_key]$$"/>
43+
</actionGroup>
44+
<actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="addToWishlistProduct">
45+
<argument name="productVar" value="$createProduct$"/>
46+
</actionGroup>
47+
<actionGroup ref="StorefrontShareCustomerWishlistActionGroup" stepKey="shareWishList">
48+
<argument name="email" value="{{Wishlist.shareInfo_emails}}"/>
49+
<argument name="message" value="{{Wishlist.shareInfo_message}}"/>
50+
</actionGroup>
51+
<actionGroup ref="AssertMessageCustomerChangeAccountInfoActionGroup" stepKey="assertMessage">
52+
<argument name="message" value="Maximum of 1 emails can be sent."/>
53+
<argument name="messageType" value="error"/>
54+
</actionGroup>
55+
</test>
56+
</tests>

0 commit comments

Comments
 (0)