From 6f824a9af6ca66aba45ebb7a1672fb1220abe0b8 Mon Sep 17 00:00:00 2001 From: Dmitry Tsymbal Date: Tue, 9 Jun 2020 13:09:51 +0300 Subject: [PATCH 1/3] Admin Delete Wishlist Item Test --- ...nCustomerDeleteWishlistItemActionGroup.xml | 17 +++++ ...minCustomerFindWishlistItemActionGroup.xml | 19 ++++++ ...NavigateCustomerWishlistTabActionGroup.xml | 15 +++++ ...inCustomerNoItemsInWishlistActionGroup.xml | 14 +++++ .../Section/AdminCustomerWishlistSection.xml | 18 ++++++ .../AdminDeleteCustomerWishListItemTest.xml | 63 +++++++++++++++++++ 6 files changed, 146 insertions(+) create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminCustomerDeleteWishlistItemActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminCustomerFindWishlistItemActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminNavigateCustomerWishlistTabActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/AssertAdminCustomerNoItemsInWishlistActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerWishlistSection.xml create mode 100644 app/code/Magento/Wishlist/Test/Mftf/Test/AdminDeleteCustomerWishListItemTest.xml diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminCustomerDeleteWishlistItemActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminCustomerDeleteWishlistItemActionGroup.xml new file mode 100644 index 0000000000000..b827cba8490b8 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminCustomerDeleteWishlistItemActionGroup.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminCustomerFindWishlistItemActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminCustomerFindWishlistItemActionGroup.xml new file mode 100644 index 0000000000000..bbdc4de330840 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminCustomerFindWishlistItemActionGroup.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminNavigateCustomerWishlistTabActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminNavigateCustomerWishlistTabActionGroup.xml new file mode 100644 index 0000000000000..66b464006aa0f --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AdminNavigateCustomerWishlistTabActionGroup.xml @@ -0,0 +1,15 @@ + + + + + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/AssertAdminCustomerNoItemsInWishlistActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AssertAdminCustomerNoItemsInWishlistActionGroup.xml new file mode 100644 index 0000000000000..16688be61171e --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/AssertAdminCustomerNoItemsInWishlistActionGroup.xml @@ -0,0 +1,14 @@ + + + + + + + + diff --git a/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerWishlistSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerWishlistSection.xml new file mode 100644 index 0000000000000..43ae3c1c0e7db --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerWishlistSection.xml @@ -0,0 +1,18 @@ + + + + +
+ + + + + +
+
diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/AdminDeleteCustomerWishListItemTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/AdminDeleteCustomerWishListItemTest.xml new file mode 100644 index 0000000000000..7a33ac9b5210e --- /dev/null +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/AdminDeleteCustomerWishListItemTest.xml @@ -0,0 +1,63 @@ + + + + + + + + + + <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> From de3b17b9f9c8fbba15ea8062ef5989fa79034d2d Mon Sep 17 00:00:00 2001 From: Dmitry Tsymbal <d.tsymbal@atwix.com> Date: Wed, 10 Jun 2020 22:28:46 +0300 Subject: [PATCH 2/3] Selectors refactoring, CRON cli adding --- .../Test/Mftf/Section/AdminCustomerWishlistSection.xml | 6 +++--- .../Test/Mftf/Test/AdminDeleteCustomerWishListItemTest.xml | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerWishlistSection.xml b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerWishlistSection.xml index 43ae3c1c0e7db..39a67968c66e4 100644 --- a/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerWishlistSection.xml +++ b/app/code/Magento/Customer/Test/Mftf/Section/AdminCustomerWishlistSection.xml @@ -10,9 +10,9 @@ 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="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> diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/AdminDeleteCustomerWishListItemTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/AdminDeleteCustomerWishListItemTest.xml index 7a33ac9b5210e..77c2b5538a61d 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/Test/AdminDeleteCustomerWishListItemTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/AdminDeleteCustomerWishListItemTest.xml @@ -21,6 +21,7 @@ <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> From 92ffe645c16178cf7f2d0c9047bd6a2b85acbb64 Mon Sep 17 00:00:00 2001 From: Vadim Malesh <51680850+engcom-Charlie@users.noreply.github.com> Date: Mon, 15 Jun 2020 12:02:14 +0300 Subject: [PATCH 3/3] added testCaseId --- .../Test/Mftf/Test/AdminDeleteCustomerWishListItemTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/AdminDeleteCustomerWishListItemTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/AdminDeleteCustomerWishListItemTest.xml index 77c2b5538a61d..af229b3507077 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/Test/AdminDeleteCustomerWishListItemTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/AdminDeleteCustomerWishListItemTest.xml @@ -14,6 +14,7 @@ <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>