Skip to content

Commit 0df29fe

Browse files
authored
ENGCOM-7674: MFTF: Admin Deletes Customer's Wishlist Item Test #28632
2 parents 31ce85a + d9a4589 commit 0df29fe

6 files changed

+148
-0
lines changed
Lines changed: 17 additions & 0 deletions
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="AdminCustomerDeleteWishlistItemActionGroup">
12+
<click selector="{{AdminCustomerWishlistSection.deleteButton}}" stepKey="clickDeleteButton"/>
13+
<waitForPageLoad stepKey="waitForResultsLoading"/>
14+
<click selector="{{AdminCustomerWishlistSection.deleteConfirm}}" stepKey="confirmDeleting"/>
15+
<waitForPageLoad stepKey="waitForPageLoading"/>
16+
</actionGroup>
17+
</actionGroups>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="AdminCustomerFindWishlistItemActionGroup">
12+
<arguments>
13+
<argument name="productName" type="string"/>
14+
</arguments>
15+
<fillField userInput="{{productName}}" selector="{{AdminCustomerWishlistSection.productName}}" stepKey="fillProductNameField"/>
16+
<click selector="{{AdminCustomerWishlistSection.searchButton}}" stepKey="clickSearchButton"/>
17+
<waitForPageLoad stepKey="waitForGridLoading"/>
18+
</actionGroup>
19+
</actionGroups>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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="AdminNavigateCustomerWishlistTabActionGroup">
12+
<click selector="{{AdminCustomerInformationSection.wishList}}" stepKey="clickWishlistButton"/>
13+
<waitForPageLoad stepKey="waitForPageLoad"/>
14+
</actionGroup>
15+
</actionGroups>
Lines changed: 14 additions & 0 deletions
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="AssertAdminCustomerNoItemsInWishlistActionGroup">
12+
<see userInput="No Items Found" selector="{{AdminCustomerWishlistSection.gridTable}}" stepKey="assertNoItems"/>
13+
</actionGroup>
14+
</actionGroups>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminCustomerWishlistSection">
12+
<element name="productName" type="input" selector="#wishlistGrid_filter_product_name"/>
13+
<element name="searchButton" type="button" selector="#wishlistGrid button[data-action='grid-filter-apply']"/>
14+
<element name="deleteButton" type="text" selector="//*[@id='wishlistGrid_table']//*[@data-column='action']//*[text()='Delete']"/>
15+
<element name="deleteConfirm" type="button" selector=".modal-popup.confirm .action-primary.action-accept"/>
16+
<element name="gridTable" type="text" selector="#wishlistGrid_table"/>
17+
</section>
18+
</sections>
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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="AdminDeleteCustomerWishlistItemTest">
12+
<annotations>
13+
<features value="Wishlist"/>
14+
<stories value="Wishlist items deleting"/>
15+
<title value="Admin deletes an item from customer wishlist"/>
16+
<description value="Admin Should be able delete items from customer wishlist"/>
17+
<testCaseId value="MC-35170"/>
18+
<group value="wishlist"/>
19+
</annotations>
20+
<before>
21+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
22+
<createData entity="SimpleProduct" stepKey="createProduct">
23+
<requiredEntity createDataKey="createCategory"/>
24+
</createData>
25+
<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/>
26+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
27+
</before>
28+
<after>
29+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
30+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
31+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/>
32+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
33+
</after>
34+
35+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount">
36+
<argument name="Customer" value="$createCustomer$"/>
37+
</actionGroup>
38+
<actionGroup ref="OpenProductFromCategoryPageActionGroup" stepKey="openProductFromCategory">
39+
<argument name="category" value="$createCategory$"/>
40+
<argument name="product" value="$createProduct$"/>
41+
</actionGroup>
42+
<actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="addToWishlistProduct">
43+
<argument name="productVar" value="$createProduct$"/>
44+
</actionGroup>
45+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logout"/>
46+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
47+
<actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="navigateToCustomerEditPage">
48+
<argument name="customer" value="$createCustomer$"/>
49+
</actionGroup>
50+
<actionGroup ref="AdminNavigateCustomerWishlistTabActionGroup" stepKey="navigateToWishlistTab"/>
51+
<actionGroup ref="AdminCustomerFindWishlistItemActionGroup" stepKey="findWishlistItem">
52+
<argument name="productName" value="$$createProduct.name$$"/>
53+
</actionGroup>
54+
<actionGroup ref="AdminCustomerDeleteWishlistItemActionGroup" stepKey="deleteItem"/>
55+
<actionGroup ref="AssertAdminCustomerNoItemsInWishlistActionGroup" stepKey="assertNoItems"/>
56+
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
57+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginOnStoreFront">
58+
<argument name="Customer" value="$createCustomer$"/>
59+
</actionGroup>
60+
<actionGroup ref="NavigateThroughCustomerTabsActionGroup" stepKey="navigateToWishlist">
61+
<argument name="navigationItemName" value="My Wish List"/>
62+
</actionGroup>
63+
<actionGroup ref="StorefrontAssertCustomerWishlistIsEmptyActionGroup" stepKey="assertNoItemsInWishlist"/>
64+
</test>
65+
</tests>

0 commit comments

Comments
 (0)