Skip to content

Commit 31ce85a

Browse files
authored
ENGCOM-7675: MFTF: Storefront Disabled Customer Wishlist Functionality Test #28635
2 parents 13b7326 + cbd365a commit 31ce85a

File tree

3 files changed

+82
-0
lines changed

3 files changed

+82
-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: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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="StorefrontDisabledCustomerWishlistFunctionalityTest">
12+
<annotations>
13+
<features value="Wishlist"/>
14+
<stories value="Disabled Wishlist Functionality"/>
15+
<title value="Wishlist Functionality is disabled in system configurations and not visible on FE"/>
16+
<description value="Customer should not see wishlist functionality if it's disabled"/>
17+
<testCaseId value="MC-35200"/>
18+
<group value="wishlist"/>
19+
<group value="configuration"/>
20+
</annotations>
21+
<before>
22+
<magentoCLI command="config:set wishlist/general/active 0" stepKey="disableWishlist"/>
23+
<magentoCLI command="cache:clean config" stepKey="cleanCache"/>
24+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
25+
<createData entity="SimpleProduct" stepKey="createProduct">
26+
<requiredEntity createDataKey="createCategory"/>
27+
</createData>
28+
<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>
29+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
30+
</before>
31+
<after>
32+
<magentoCLI command="config:set wishlist/general/active 1" stepKey="enableWishlist"/>
33+
<magentoCLI command="cache:clean config" stepKey="cacheClean"/>
34+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
35+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
36+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/>
37+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
38+
</after>
39+
40+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount">
41+
<argument name="Customer" value="$createCustomer$"/>
42+
</actionGroup>
43+
<actionGroup ref="StorefrontAssertCustomerSidebarItemIsNotPresentActionGroup" stepKey="assertItemIsNotPresent">
44+
<argument name="itemName" value="My Wish List"/>
45+
</actionGroup>
46+
<actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="openProductPage">
47+
<argument name="productUrlKey" value="$$createProduct.custom_attributes[url_key]$$"/>
48+
</actionGroup>
49+
<actionGroup ref="StorefrontAssertProductPageAddToWishlistButtonIsNotPresentActionGroup" stepKey="assertButtonIsAbsent"/>
50+
</test>
51+
</tests>

0 commit comments

Comments
 (0)