Skip to content

Commit a26e761

Browse files
committed
Admin Wishlist Disabling
1 parent f571e90 commit a26e761

File tree

3 files changed

+80
-0
lines changed

3 files changed

+80
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="StorefrontAssertProductPageAddToWishlistButtonIsNotPresentActionGroup">
12+
<dontSee userInput="Add to Wish List" selector="{{StorefrontProductPageSection.addToWishlist}}" stepKey="dontSeeElement"/>
13+
</actionGroup>
14+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="StorefrontAssertCustomerSidebarItemIsNotPresentActionGroup">
12+
<arguments>
13+
<argument name="itemName" type="string"/>
14+
</arguments>
15+
<dontSee userInput="{{itemName}}" selector="{{StorefrontCustomerSidebarSection.sidebarTab(itemName)}}" stepKey="dontSeeElement"/>
16+
</actionGroup>
17+
</actionGroups>
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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="AdminDisableCustomerWishlistTest">
12+
<annotations>
13+
<features value="Wishlist"/>
14+
<stories value="Wishlist Disabling"/>
15+
<title value="Admin Disabling Wishlist in configurations"/>
16+
<description value="Admin should be able disable Wishlist functionality in system configurations. Wishlist elements should be not visible for customers"/>
17+
<group value="wishlist"/>
18+
<group value="configuration"/>
19+
</annotations>
20+
<before>
21+
<magentoCLI command="config:set wishlist/general/active 0" stepKey="disableWishlist"/>
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/general/active 1" stepKey="enableWishlist"/>
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="StorefrontAssertCustomerSidebarItemIsNotPresentActionGroup" stepKey="assertItemIsNotPresent">
42+
<argument name="itemName" value="My Wish List"/>
43+
</actionGroup>
44+
<actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="openProductPage">
45+
<argument name="productUrlKey" value="$$createProduct.custom_attributes[url_key]$$"/>
46+
</actionGroup>
47+
<actionGroup ref="StorefrontAssertProductPageAddToWishlistButtonIsNotPresentActionGroup" stepKey="assertButtonIsAbsent"/>
48+
</test>
49+
</tests>

0 commit comments

Comments
 (0)