Skip to content

Commit 6f824a9

Browse files
committed
Admin Delete Wishlist Item Test
1 parent f571e90 commit 6f824a9

6 files changed

+146
-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=".action-default.scalable.action-secondary"/>
14+
<element name="deleteButton" type="text" selector=".even > td:nth-child(7) > a:nth-child(1)"/>
15+
<element name="deleteConfirm" type="button" selector=".action-primary.action-accept"/>
16+
<element name="gridTable" type="text" selector="#wishlistGrid_table"/>
17+
</section>
18+
</sections>
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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+
<group value="wishlist"/>
18+
</annotations>
19+
<before>
20+
<createData entity="SimpleSubCategory" stepKey="createCategory"/>
21+
<createData entity="SimpleProduct" stepKey="createProduct">
22+
<requiredEntity createDataKey="createCategory"/>
23+
</createData>
24+
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
25+
</before>
26+
<after>
27+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
28+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
29+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/>
30+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
31+
</after>
32+
33+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount">
34+
<argument name="Customer" value="$createCustomer$"/>
35+
</actionGroup>
36+
<actionGroup ref="OpenProductFromCategoryPageActionGroup" stepKey="openProductFromCategory">
37+
<argument name="category" value="$createCategory$"/>
38+
<argument name="product" value="$createProduct$"/>
39+
</actionGroup>
40+
<actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="addToWishlistProduct">
41+
<argument name="productVar" value="$createProduct$"/>
42+
</actionGroup>
43+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logout"/>
44+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
45+
<actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="navigateToCustomerEditPage">
46+
<argument name="customer" value="$createCustomer$"/>
47+
</actionGroup>
48+
<actionGroup ref="AdminNavigateCustomerWishlistTabActionGroup" stepKey="navigateToWishlistTab"/>
49+
<actionGroup ref="AdminCustomerFindWishlistItemActionGroup" stepKey="findWishlistItem">
50+
<argument name="productName" value="$$createProduct.name$$"/>
51+
</actionGroup>
52+
<actionGroup ref="AdminCustomerDeleteWishlistItemActionGroup" stepKey="deleteItem"/>
53+
<actionGroup ref="AssertAdminCustomerNoItemsInWishlistActionGroup" stepKey="assertNoItems"/>
54+
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
55+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginOnStoreFront">
56+
<argument name="Customer" value="$createCustomer$"/>
57+
</actionGroup>
58+
<actionGroup ref="NavigateThroughCustomerTabsActionGroup" stepKey="navigateToWishlist">
59+
<argument name="navigationItemName" value="My Wish List"/>
60+
</actionGroup>
61+
<actionGroup ref="StorefrontAssertCustomerWishlistIsEmptyActionGroup" stepKey="assertNoItemsInWishlist"/>
62+
</test>
63+
</tests>

0 commit comments

Comments
 (0)