-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f571e90
commit 6f824a9
Showing
6 changed files
with
146 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
...ode/Magento/Customer/Test/Mftf/ActionGroup/AdminCustomerDeleteWishlistItemActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminCustomerDeleteWishlistItemActionGroup"> | ||
<click selector="{{AdminCustomerWishlistSection.deleteButton}}" stepKey="clickDeleteButton"/> | ||
<waitForPageLoad stepKey="waitForResultsLoading"/> | ||
<click selector="{{AdminCustomerWishlistSection.deleteConfirm}}" stepKey="confirmDeleting"/> | ||
<waitForPageLoad stepKey="waitForPageLoading"/> | ||
</actionGroup> | ||
</actionGroups> |
19 changes: 19 additions & 0 deletions
19
app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminCustomerFindWishlistItemActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminCustomerFindWishlistItemActionGroup"> | ||
<arguments> | ||
<argument name="productName" type="string"/> | ||
</arguments> | ||
<fillField userInput="{{productName}}" selector="{{AdminCustomerWishlistSection.productName}}" stepKey="fillProductNameField"/> | ||
<click selector="{{AdminCustomerWishlistSection.searchButton}}" stepKey="clickSearchButton"/> | ||
<waitForPageLoad stepKey="waitForGridLoading"/> | ||
</actionGroup> | ||
</actionGroups> |
15 changes: 15 additions & 0 deletions
15
...de/Magento/Customer/Test/Mftf/ActionGroup/AdminNavigateCustomerWishlistTabActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AdminNavigateCustomerWishlistTabActionGroup"> | ||
<click selector="{{AdminCustomerInformationSection.wishList}}" stepKey="clickWishlistButton"/> | ||
<waitForPageLoad stepKey="waitForPageLoad"/> | ||
</actionGroup> | ||
</actionGroups> |
14 changes: 14 additions & 0 deletions
14
...agento/Customer/Test/Mftf/ActionGroup/AssertAdminCustomerNoItemsInWishlistActionGroup.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd"> | ||
<actionGroup name="AssertAdminCustomerNoItemsInWishlistActionGroup"> | ||
<see userInput="No Items Found" selector="{{AdminCustomerWishlistSection.gridTable}}" stepKey="assertNoItems"/> | ||
</actionGroup> | ||
</actionGroups> |
18 changes: 18 additions & 0 deletions
18
app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerWishlistSection.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd"> | ||
<section name="AdminCustomerWishlistSection"> | ||
<element name="productName" type="input" selector="#wishlistGrid_filter_product_name"/> | ||
<element name="searchButton" type="button" selector=".action-default.scalable.action-secondary"/> | ||
<element name="deleteButton" type="text" selector=".even > td:nth-child(7) > a:nth-child(1)"/> | ||
<element name="deleteConfirm" type="button" selector=".action-primary.action-accept"/> | ||
<element name="gridTable" type="text" selector="#wishlistGrid_table"/> | ||
</section> | ||
</sections> |
63 changes: 63 additions & 0 deletions
63
app/code/Magento/Wishlist/Test/Mftf/Test/AdminDeleteCustomerWishListItemTest.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
/** | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
--> | ||
|
||
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> | ||
<test name="AdminDeleteCustomerWishlistItemTest"> | ||
<annotations> | ||
<features value="Wishlist"/> | ||
<stories value="Wishlist items deleting"/> | ||
<title value="Admin deletes an item from customer wishlist"/> | ||
<description value="Admin Should be able delete items from customer wishlist"/> | ||
<group value="wishlist"/> | ||
</annotations> | ||
<before> | ||
<createData entity="SimpleSubCategory" stepKey="createCategory"/> | ||
<createData entity="SimpleProduct" stepKey="createProduct"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<createData entity="Simple_US_Customer" stepKey="createCustomer"/> | ||
</before> | ||
<after> | ||
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/> | ||
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/> | ||
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> | ||
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/> | ||
</after> | ||
|
||
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefrontAccount"> | ||
<argument name="Customer" value="$createCustomer$"/> | ||
</actionGroup> | ||
<actionGroup ref="OpenProductFromCategoryPageActionGroup" stepKey="openProductFromCategory"> | ||
<argument name="category" value="$createCategory$"/> | ||
<argument name="product" value="$createProduct$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="addToWishlistProduct"> | ||
<argument name="productVar" value="$createProduct$"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logout"/> | ||
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/> | ||
<actionGroup ref="OpenEditCustomerFromAdminActionGroup" stepKey="navigateToCustomerEditPage"> | ||
<argument name="customer" value="$createCustomer$"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminNavigateCustomerWishlistTabActionGroup" stepKey="navigateToWishlistTab"/> | ||
<actionGroup ref="AdminCustomerFindWishlistItemActionGroup" stepKey="findWishlistItem"> | ||
<argument name="productName" value="$$createProduct.name$$"/> | ||
</actionGroup> | ||
<actionGroup ref="AdminCustomerDeleteWishlistItemActionGroup" stepKey="deleteItem"/> | ||
<actionGroup ref="AssertAdminCustomerNoItemsInWishlistActionGroup" stepKey="assertNoItems"/> | ||
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/> | ||
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginOnStoreFront"> | ||
<argument name="Customer" value="$createCustomer$"/> | ||
</actionGroup> | ||
<actionGroup ref="NavigateThroughCustomerTabsActionGroup" stepKey="navigateToWishlist"> | ||
<argument name="navigationItemName" value="My Wish List"/> | ||
</actionGroup> | ||
<actionGroup ref="StorefrontAssertCustomerWishlistIsEmptyActionGroup" stepKey="assertNoItemsInWishlist"/> | ||
</test> | ||
</tests> |