From e7921092883f6b5387f5203a7b4dca829a77fe70 Mon Sep 17 00:00:00 2001 From: Kate Kyzyma Date: Fri, 29 May 2020 17:05:28 +0300 Subject: [PATCH 01/13] Updating the test --- ...ategoryNameOnStoreViewLevelActionGroup.xml | 23 +++ ...archUrlRewriteByRequestPathActionGroup.xml | 23 +++ ...RequestPathInUrlRewriteGrigActionGroup.xml | 22 +++ ...hIsNotFoundInUrlRewriteGrigActionGroup.xml | 22 +++ ...nTargetPathInUrlRewriteGrigActionGroup.xml | 22 +++ ...hIsNotFoundInUrlRewriteGrigActionGroup.xml | 22 +++ ...wsProductImportWithConfigTurnedOffTest.xml | 140 +++++++++++------- 7 files changed, 220 insertions(+), 54 deletions(-) create mode 100644 app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminChangeCategoryNameOnStoreViewLevelActionGroup.xml create mode 100644 app/code/Magento/UrlRewrite/Test/Mftf/ActionGroup/AdminSearchUrlRewriteByRequestPathActionGroup.xml create mode 100644 app/code/Magento/UrlRewrite/Test/Mftf/ActionGroup/AssertAdminRequestPathInUrlRewriteGrigActionGroup.xml create mode 100644 app/code/Magento/UrlRewrite/Test/Mftf/ActionGroup/AssertAdminRequestPathIsNotFoundInUrlRewriteGrigActionGroup.xml create mode 100644 app/code/Magento/UrlRewrite/Test/Mftf/ActionGroup/AssertAdminTargetPathInUrlRewriteGrigActionGroup.xml create mode 100644 app/code/Magento/UrlRewrite/Test/Mftf/ActionGroup/AssertAdminTargetPathIsNotFoundInUrlRewriteGrigActionGroup.xml diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminChangeCategoryNameOnStoreViewLevelActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminChangeCategoryNameOnStoreViewLevelActionGroup.xml new file mode 100644 index 0000000000000..14a7967422332 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminChangeCategoryNameOnStoreViewLevelActionGroup.xml @@ -0,0 +1,23 @@ + + + + + + + Updates the Category Name for proper Store View. + + + + + + + + + + diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/ActionGroup/AdminSearchUrlRewriteByRequestPathActionGroup.xml b/app/code/Magento/UrlRewrite/Test/Mftf/ActionGroup/AdminSearchUrlRewriteByRequestPathActionGroup.xml new file mode 100644 index 0000000000000..dfdc840e0dc9f --- /dev/null +++ b/app/code/Magento/UrlRewrite/Test/Mftf/ActionGroup/AdminSearchUrlRewriteByRequestPathActionGroup.xml @@ -0,0 +1,23 @@ + + + + + + + EXTENDS: SearchAndSelectUrlRewrite. Removes 'clickOnRowSelectButton' and 'clickOnEditButton'. + + + + + + + + + + diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/ActionGroup/AssertAdminRequestPathInUrlRewriteGrigActionGroup.xml b/app/code/Magento/UrlRewrite/Test/Mftf/ActionGroup/AssertAdminRequestPathInUrlRewriteGrigActionGroup.xml new file mode 100644 index 0000000000000..9de6045d70c03 --- /dev/null +++ b/app/code/Magento/UrlRewrite/Test/Mftf/ActionGroup/AssertAdminRequestPathInUrlRewriteGrigActionGroup.xml @@ -0,0 +1,22 @@ + + + + + + + Assert the requested path is shown in the URL Rewrite grid. + + + + + + + + diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/ActionGroup/AssertAdminRequestPathIsNotFoundInUrlRewriteGrigActionGroup.xml b/app/code/Magento/UrlRewrite/Test/Mftf/ActionGroup/AssertAdminRequestPathIsNotFoundInUrlRewriteGrigActionGroup.xml new file mode 100644 index 0000000000000..8aac6ae54582a --- /dev/null +++ b/app/code/Magento/UrlRewrite/Test/Mftf/ActionGroup/AssertAdminRequestPathIsNotFoundInUrlRewriteGrigActionGroup.xml @@ -0,0 +1,22 @@ + + + + + + + Assert the requested path is not shown in the URL Rewrite grid. + + + + + + + + diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/ActionGroup/AssertAdminTargetPathInUrlRewriteGrigActionGroup.xml b/app/code/Magento/UrlRewrite/Test/Mftf/ActionGroup/AssertAdminTargetPathInUrlRewriteGrigActionGroup.xml new file mode 100644 index 0000000000000..a409860811837 --- /dev/null +++ b/app/code/Magento/UrlRewrite/Test/Mftf/ActionGroup/AssertAdminTargetPathInUrlRewriteGrigActionGroup.xml @@ -0,0 +1,22 @@ + + + + + + + Assert the target path is shown in the URL Rewrite grid. + + + + + + + + diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/ActionGroup/AssertAdminTargetPathIsNotFoundInUrlRewriteGrigActionGroup.xml b/app/code/Magento/UrlRewrite/Test/Mftf/ActionGroup/AssertAdminTargetPathIsNotFoundInUrlRewriteGrigActionGroup.xml new file mode 100644 index 0000000000000..739675ba264ea --- /dev/null +++ b/app/code/Magento/UrlRewrite/Test/Mftf/ActionGroup/AssertAdminTargetPathIsNotFoundInUrlRewriteGrigActionGroup.xml @@ -0,0 +1,22 @@ + + + + + + + Assert the target path is not shown in the URL Rewrite grid. + + + + + + + + diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest/AdminUrlRewriteMultipleStoreviewsProductImportWithConfigTurnedOffTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest/AdminUrlRewriteMultipleStoreviewsProductImportWithConfigTurnedOffTest.xml index 1d604ef7648dc..77462b27ada26 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest/AdminUrlRewriteMultipleStoreviewsProductImportWithConfigTurnedOffTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest/AdminUrlRewriteMultipleStoreviewsProductImportWithConfigTurnedOffTest.xml @@ -80,76 +80,108 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - + + + + + + + + + + - - - - - - + + + + + + + + + - - - - - - - - + + + + + + + + + + + + + + + - - - - - - - - + + + + + + + + + + + + + + + - + - - - - + + + + + + + + + + + - + - - - - + + + + + + + + + + + From 1b6211e626ecd01b66152edf10618426279437dd Mon Sep 17 00:00:00 2001 From: Kate Kyzyma Date: Mon, 1 Jun 2020 14:15:46 +0300 Subject: [PATCH 02/13] Updating the test --- ...toreviewsProductImportWithConfigTurnedOffTest.xml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest/AdminUrlRewriteMultipleStoreviewsProductImportWithConfigTurnedOffTest.xml b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest/AdminUrlRewriteMultipleStoreviewsProductImportWithConfigTurnedOffTest.xml index 77462b27ada26..7d5bb78f3b3f9 100644 --- a/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest/AdminUrlRewriteMultipleStoreviewsProductImportWithConfigTurnedOffTest.xml +++ b/app/code/Magento/UrlRewrite/Test/Mftf/Test/AdminCheckUrlRewritesCorrectlyGeneratedForMultipleStoreviewsDuringProductImportTest/AdminUrlRewriteMultipleStoreviewsProductImportWithConfigTurnedOffTest.xml @@ -64,9 +64,9 @@ - - - + + + @@ -74,9 +74,9 @@ - - - + + + From a713517812d9e94965cb7f7513dccd22a9795d6c Mon Sep 17 00:00:00 2001 From: Kate Kyzyma Date: Tue, 9 Jun 2020 09:37:02 +0300 Subject: [PATCH 03/13] Change stepKey name --- .../AdminChangeCategoryNameOnStoreViewLevelActionGroup.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminChangeCategoryNameOnStoreViewLevelActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminChangeCategoryNameOnStoreViewLevelActionGroup.xml index 14a7967422332..94475d2bd88e2 100644 --- a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminChangeCategoryNameOnStoreViewLevelActionGroup.xml +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminChangeCategoryNameOnStoreViewLevelActionGroup.xml @@ -16,8 +16,10 @@ - - + + From 6f824a9af6ca66aba45ebb7a1672fb1220abe0b8 Mon Sep 17 00:00:00 2001 From: Dmitry Tsymbal Date: Tue, 9 Jun 2020 13:09:51 +0300 Subject: [PATCH 04/13] 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 a26e7615361fbec5e4adf265288e91d438b68faa Mon Sep 17 00:00:00 2001 From: Dmitry Tsymbal <d.tsymbal@atwix.com> Date: Tue, 9 Jun 2020 15:58:09 +0300 Subject: [PATCH 05/13] Admin Wishlist Disabling --- ...oWishlistButtonIsNotPresentActionGroup.xml | 14 ++++++ ...omerSidebarItemIsNotPresentActionGroup.xml | 17 +++++++ .../Test/AdminDisableCustomerWishlistTest.xml | 49 +++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAssertProductPageAddToWishlistButtonIsNotPresentActionGroup.xml create mode 100644 app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontAssertCustomerSidebarItemIsNotPresentActionGroup.xml create mode 100644 app/code/Magento/Wishlist/Test/Mftf/Test/AdminDisableCustomerWishlistTest.xml diff --git a/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAssertProductPageAddToWishlistButtonIsNotPresentActionGroup.xml b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAssertProductPageAddToWishlistButtonIsNotPresentActionGroup.xml new file mode 100644 index 0000000000000..65858be673dfa --- /dev/null +++ b/app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAssertProductPageAddToWishlistButtonIsNotPresentActionGroup.xml @@ -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="StorefrontAssertProductPageAddToWishlistButtonIsNotPresentActionGroup"> + <dontSee userInput="Add to Wish List" selector="{{StorefrontProductPageSection.addToWishlist}}" stepKey="dontSeeElement"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontAssertCustomerSidebarItemIsNotPresentActionGroup.xml b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontAssertCustomerSidebarItemIsNotPresentActionGroup.xml new file mode 100644 index 0000000000000..5dafe59bf3c48 --- /dev/null +++ b/app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontAssertCustomerSidebarItemIsNotPresentActionGroup.xml @@ -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="StorefrontAssertCustomerSidebarItemIsNotPresentActionGroup"> + <arguments> + <argument name="itemName" type="string"/> + </arguments> + <dontSee userInput="{{itemName}}" selector="{{StorefrontCustomerSidebarSection.sidebarTab(itemName)}}" stepKey="dontSeeElement"/> + </actionGroup> +</actionGroups> diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/AdminDisableCustomerWishlistTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/AdminDisableCustomerWishlistTest.xml new file mode 100644 index 0000000000000..e019be58b02e0 --- /dev/null +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/AdminDisableCustomerWishlistTest.xml @@ -0,0 +1,49 @@ +<?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="AdminDisableCustomerWishlistTest"> + <annotations> + <features value="Wishlist"/> + <stories value="Wishlist Disabling"/> + <title value="Admin Disabling Wishlist in configurations"/> + <description value="Admin should be able disable Wishlist functionality in system configurations. Wishlist elements should be not visible for customers"/> + <group value="wishlist"/> + <group value="configuration"/> + </annotations> + <before> + <magentoCLI command="config:set wishlist/general/active 0" stepKey="disableWishlist"/> + <magentoCLI command="cache:clean" stepKey="cleanCache"/> + <createData entity="SimpleSubCategory" stepKey="createCategory"/> + <createData entity="SimpleProduct" stepKey="createProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> + </before> + <after> + <magentoCLI command="config:set wishlist/general/active 1" stepKey="enableWishlist"/> + <magentoCLI command="cache:clean" stepKey="cacheClean"/> + <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="StorefrontAssertCustomerSidebarItemIsNotPresentActionGroup" stepKey="assertItemIsNotPresent"> + <argument name="itemName" value="My Wish List"/> + </actionGroup> + <actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="openProductPage"> + <argument name="productUrlKey" value="$$createProduct.custom_attributes[url_key]$$"/> + </actionGroup> + <actionGroup ref="StorefrontAssertProductPageAddToWishlistButtonIsNotPresentActionGroup" stepKey="assertButtonIsAbsent"/> + </test> +</tests> From 0b7656ff32b539da40a02a9269be7bb9e26df294 Mon Sep 17 00:00:00 2001 From: Dmitry Tsymbal <d.tsymbal@atwix.com> Date: Tue, 9 Jun 2020 16:10:12 +0300 Subject: [PATCH 06/13] Refactoring --- ...orefrontDisabledCustomerWishlistFunctionalityTest.xml} | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename app/code/Magento/Wishlist/Test/Mftf/Test/{AdminDisableCustomerWishlistTest.xml => StorefrontDisabledCustomerWishlistFunctionalityTest.xml} (86%) diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/AdminDisableCustomerWishlistTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDisabledCustomerWishlistFunctionalityTest.xml similarity index 86% rename from app/code/Magento/Wishlist/Test/Mftf/Test/AdminDisableCustomerWishlistTest.xml rename to app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDisabledCustomerWishlistFunctionalityTest.xml index e019be58b02e0..18e64f1bbebb0 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/Test/AdminDisableCustomerWishlistTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDisabledCustomerWishlistFunctionalityTest.xml @@ -8,12 +8,12 @@ <tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> - <test name="AdminDisableCustomerWishlistTest"> + <test name="StorefrontDisabledCustomerWishlistFunctionalityTest"> <annotations> <features value="Wishlist"/> - <stories value="Wishlist Disabling"/> - <title value="Admin Disabling Wishlist in configurations"/> - <description value="Admin should be able disable Wishlist functionality in system configurations. Wishlist elements should be not visible for customers"/> + <stories value="Disabled Wishlist Functionality"/> + <title value="Wishlist Functionality is disabled in system configurations and not visible on FE"/> + <description value="Customer should not see wishlist functionality if it's disabled"/> <group value="wishlist"/> <group value="configuration"/> </annotations> From 7096d82b80b96e522b4043d15ff825b8227b7f84 Mon Sep 17 00:00:00 2001 From: Dmitry Tsymbal <d.tsymbal@atwix.com> Date: Tue, 9 Jun 2020 18:02:09 +0300 Subject: [PATCH 07/13] Sharing Wishlist with more than allowed emails qty test --- ...ithMoreThanMaximumAllowedEmailsQtyTest.xml | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontShareWishlistWithMoreThanMaximumAllowedEmailsQtyTest.xml diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontShareWishlistWithMoreThanMaximumAllowedEmailsQtyTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontShareWishlistWithMoreThanMaximumAllowedEmailsQtyTest.xml new file mode 100644 index 0000000000000..58bddec06de3c --- /dev/null +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontShareWishlistWithMoreThanMaximumAllowedEmailsQtyTest.xml @@ -0,0 +1,56 @@ +<?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="StorefrontShareWishlistWithMoreThanMaximumAllowedEmailsQtyTest"> + <annotations> + <features value="Wishlist"/> + <stories value="Sharing wishlist with more than Maximum Allowed Emails qty"/> + <title value="Sharing wishlist with more than Maximum Allowed Emails qty"/> + <description value="Customer should not have a possibility share wishlist with more than maximum allowed emails qty"/> + <group value="wishlist"/> + <group value="configuration"/> + </annotations> + <before> + <magentoCLI command="config:set wishlist/email/number_limit 1" stepKey="changeEmailsQtyLimit"/> + <magentoCLI command="cache:clean" stepKey="cleanCache"/> + <createData entity="SimpleSubCategory" stepKey="createCategory"/> + <createData entity="SimpleProduct" stepKey="createProduct"> + <requiredEntity createDataKey="createCategory"/> + </createData> + <createData entity="Simple_US_Customer" stepKey="createCustomer"/> + </before> + <after> + <magentoCLI command="config:set wishlist/email/number_limit 10" stepKey="returnDefaultValue"/> + <magentoCLI command="cache:clean" stepKey="cacheClean"/> + <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="OpenStoreFrontProductPageActionGroup" stepKey="openProductPage"> + <argument name="productUrlKey" value="$$createProduct.custom_attributes[url_key]$$"/> + </actionGroup> + <actionGroup ref="StorefrontCustomerAddProductToWishlistActionGroup" stepKey="addToWishlistProduct"> + <argument name="productVar" value="$createProduct$"/> + </actionGroup> + <actionGroup ref="StorefrontShareCustomerWishlistActionGroup" stepKey="shareWishList"> + <argument name="email" value="{{Wishlist.shareInfo_emails}}"/> + <argument name="message" value="{{Wishlist.shareInfo_message}}"/> + </actionGroup> + <actionGroup ref="AssertMessageCustomerChangeAccountInfoActionGroup" stepKey="assertMessage"> + <argument name="message" value="Maximum of 1 emails can be sent."/> + <argument name="messageType" value="error"/> + </actionGroup> + </test> +</tests> From dd156bc649fbdec72cd1aa32d130ee227b7081ba Mon Sep 17 00:00:00 2001 From: Dmitry Tsymbal <d.tsymbal@atwix.com> Date: Wed, 10 Jun 2020 11:03:48 +0300 Subject: [PATCH 08/13] Refactoring --- .../StorefrontDisabledCustomerWishlistFunctionalityTest.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDisabledCustomerWishlistFunctionalityTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDisabledCustomerWishlistFunctionalityTest.xml index 18e64f1bbebb0..cde686ce202a2 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDisabledCustomerWishlistFunctionalityTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDisabledCustomerWishlistFunctionalityTest.xml @@ -19,16 +19,17 @@ </annotations> <before> <magentoCLI command="config:set wishlist/general/active 0" stepKey="disableWishlist"/> - <magentoCLI command="cache:clean" stepKey="cleanCache"/> + <magentoCLI command="cache:clean config" stepKey="cleanCache"/> <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> <magentoCLI command="config:set wishlist/general/active 1" stepKey="enableWishlist"/> - <magentoCLI command="cache:clean" stepKey="cacheClean"/> + <magentoCLI command="cache:clean config" stepKey="cacheClean"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> From 98384cee7165405696234f302693eaf2d256b147 Mon Sep 17 00:00:00 2001 From: Dmitry Tsymbal <d.tsymbal@atwix.com> Date: Wed, 10 Jun 2020 11:14:03 +0300 Subject: [PATCH 09/13] Refactoring --- ...tShareWishlistWithMoreThanMaximumAllowedEmailsQtyTest.xml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontShareWishlistWithMoreThanMaximumAllowedEmailsQtyTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontShareWishlistWithMoreThanMaximumAllowedEmailsQtyTest.xml index 58bddec06de3c..abb0c16c91377 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontShareWishlistWithMoreThanMaximumAllowedEmailsQtyTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontShareWishlistWithMoreThanMaximumAllowedEmailsQtyTest.xml @@ -19,16 +19,17 @@ </annotations> <before> <magentoCLI command="config:set wishlist/email/number_limit 1" stepKey="changeEmailsQtyLimit"/> - <magentoCLI command="cache:clean" stepKey="cleanCache"/> + <magentoCLI command="cache:clean config" stepKey="cleanCache"/> <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> <magentoCLI command="config:set wishlist/email/number_limit 10" stepKey="returnDefaultValue"/> - <magentoCLI command="cache:clean" stepKey="cacheClean"/> + <magentoCLI command="cache:clean config" stepKey="cacheClean"/> <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> <actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutCustomer"/> 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 10/13] 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 33dec4903df07d71ef5094645776e4950da64535 Mon Sep 17 00:00:00 2001 From: Vadim Malesh <51680850+engcom-Charlie@users.noreply.github.com> Date: Mon, 15 Jun 2020 10:24:07 +0300 Subject: [PATCH 11/13] added testCaseId --- ...frontShareWishlistWithMoreThanMaximumAllowedEmailsQtyTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontShareWishlistWithMoreThanMaximumAllowedEmailsQtyTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontShareWishlistWithMoreThanMaximumAllowedEmailsQtyTest.xml index abb0c16c91377..7ec06e3f3cf4d 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontShareWishlistWithMoreThanMaximumAllowedEmailsQtyTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontShareWishlistWithMoreThanMaximumAllowedEmailsQtyTest.xml @@ -14,6 +14,7 @@ <stories value="Sharing wishlist with more than Maximum Allowed Emails qty"/> <title value="Sharing wishlist with more than Maximum Allowed Emails qty"/> <description value="Customer should not have a possibility share wishlist with more than maximum allowed emails qty"/> + <testCaseId value="MC-35167"/> <group value="wishlist"/> <group value="configuration"/> </annotations> 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 12/13] 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> From 505dd602e060397f5d56045d49fb2b4e17d6f3bd Mon Sep 17 00:00:00 2001 From: Andrii Kalinich <51681435+engcom-Echo@users.noreply.github.com> Date: Tue, 16 Jun 2020 15:25:15 +0300 Subject: [PATCH 13/13] Update StorefrontDisabledCustomerWishlistFunctionalityTest.xml --- .../Test/StorefrontDisabledCustomerWishlistFunctionalityTest.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDisabledCustomerWishlistFunctionalityTest.xml b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDisabledCustomerWishlistFunctionalityTest.xml index cde686ce202a2..17d3ff1009b9b 100644 --- a/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDisabledCustomerWishlistFunctionalityTest.xml +++ b/app/code/Magento/Wishlist/Test/Mftf/Test/StorefrontDisabledCustomerWishlistFunctionalityTest.xml @@ -14,6 +14,7 @@ <stories value="Disabled Wishlist Functionality"/> <title value="Wishlist Functionality is disabled in system configurations and not visible on FE"/> <description value="Customer should not see wishlist functionality if it's disabled"/> + <testCaseId value="MC-35200"/> <group value="wishlist"/> <group value="configuration"/> </annotations>