-
Notifications
You must be signed in to change notification settings - Fork 9.4k
MFTF: Admin Deletes Customer's Wishlist Item Test #28632
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
magento-engcom-team
merged 4 commits into
magento:2.4-develop
from
DmitryTsymbal:AdminDeleteCustomerWishlistItem
Jun 19, 2020
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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="#wishlistGrid button[data-action='grid-filter-apply']"/> | ||
<element name="deleteButton" type="text" selector="//*[@id='wishlistGrid_table']//*[@data-column='action']//*[text()='Delete']"/> | ||
<element name="deleteConfirm" type="button" selector=".modal-popup.confirm .action-primary.action-accept"/> | ||
<element name="gridTable" type="text" selector="#wishlistGrid_table"/> | ||
</section> | ||
</sections> |
65 changes: 65 additions & 0 deletions
65
app/code/Magento/Wishlist/Test/Mftf/Test/AdminDeleteCustomerWishListItemTest.xml
This file contains hidden or 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,65 @@ | ||
<?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"/> | ||
<testCaseId value="MC-35170"/> | ||
<group value="wishlist"/> | ||
</annotations> | ||
<before> | ||
<createData entity="SimpleSubCategory" stepKey="createCategory"/> | ||
<createData entity="SimpleProduct" stepKey="createProduct"> | ||
<requiredEntity createDataKey="createCategory"/> | ||
</createData> | ||
<magentoCLI command="cron:run --group=index" stepKey="runCronIndexer"/> | ||
<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> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please bear in mind that tests might be run in "on schedule" indexing mode
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added cron cli