From 2248d290c341e395d4e884bf4ae742f48f4fed5a Mon Sep 17 00:00:00 2001 From: olysenko Date: Fri, 23 Mar 2018 15:58:53 +0200 Subject: [PATCH 1/4] MAGETWO-89382: Automate MAGETWO-46344 MFTF --- .../ActionGroup/MoveCategoryActionGroup.xml | 23 +++ .../StorefrontProductActionGroup.xml | 13 ++ .../Catalog/Data/CategoryData.xml | 8 + .../Catalog/Page/AdminCategoryPage.xml | 1 + .../AdminCategorySidebarTreeSection.xml | 1 + ...minCategoryWarningMessagesPopupSection.xml | 16 ++ .../Catalog/Test/DeleteCategoriesTest.xml | 161 ++++++++++++++++++ 7 files changed, 223 insertions(+) create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/MoveCategoryActionGroup.xml create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryWarningMessagesPopupSection.xml create mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/DeleteCategoriesTest.xml diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/MoveCategoryActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/MoveCategoryActionGroup.xml new file mode 100644 index 0000000000000..d08dc9ad7f893 --- /dev/null +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/MoveCategoryActionGroup.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontProductActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontProductActionGroup.xml index ffc1687bc9f58..ddefa1a839804 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontProductActionGroup.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontProductActionGroup.xml @@ -23,4 +23,17 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/CategoryData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/CategoryData.xml index 5de996809b704..d76c1286f2636 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/CategoryData.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/CategoryData.xml @@ -22,5 +22,13 @@ simplesubcategory true true + + + + NewRootCategory + newrootcategory + true + true + 1 diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminCategoryPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminCategoryPage.xml index f51d2e8a28939..7cb4ca0e7987d 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminCategoryPage.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminCategoryPage.xml @@ -18,5 +18,6 @@
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategorySidebarTreeSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategorySidebarTreeSection.xml index e914c80c3e6ac..9c8ee70874372 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategorySidebarTreeSection.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategorySidebarTreeSection.xml @@ -14,5 +14,6 @@ +
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryWarningMessagesPopupSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryWarningMessagesPopupSection.xml new file mode 100644 index 0000000000000..6f9b0738a451e --- /dev/null +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryWarningMessagesPopupSection.xml @@ -0,0 +1,16 @@ + + + + +
+ + + +
+
diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/DeleteCategoriesTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/DeleteCategoriesTest.xml new file mode 100644 index 0000000000000..c4de4866519e0 --- /dev/null +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/DeleteCategoriesTest.xml @@ -0,0 +1,161 @@ + + + + + + + + + + <description value="Delete categories."/> + <severity value="CRITICAL"/> + <testCaseId value="MAGETWO-46344"/> + <group value="category"/> + </annotations> + <before> + <createData entity="_defaultCategory" stepKey="createCategoryC"/> + <createData entity="_defaultProduct" stepKey="createProduct1"> + <requiredEntity createDataKey="createCategoryC"/> + </createData> + <createData entity="SimpleSubCategory" stepKey="createSubCategory"> + <requiredEntity createDataKey="createCategoryC"/> + </createData> + <createData entity="_defaultProduct" stepKey="createProduct2"> + <requiredEntity createDataKey="createSubCategory"/> + </createData> + <createData entity="_defaultCategory" stepKey="createCategoryB"/> + <createData entity="_defaultProduct" stepKey="createProduct3"> + <requiredEntity createDataKey="createCategoryB"/> + </createData> + <createData entity="NewRootCategory" stepKey="createNewRootCategoryA"/> + </before> + <after> + <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/> + </after> + <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/> + <amOnPage url="{{AdminCategoryPage.url}}" stepKey="navigateToCategoryPage1"/> + <waitForPageLoad time="30" stepKey="waitForPageLoad1"/> + <click selector="{{AdminCategorySidebarTreeSection.category($$createNewRootCategoryA.name$$)}}" stepKey="openNewRootCategory"/> + <waitForPageLoad stepKey="waitForPageLoad1a"/> + <seeElement selector="{{AdminCategoryMainActionsSection.DeleteButton}}" stepKey="assertDeleteButtonIsPresent"/> + <!--Move categories from Default Category to NewRootCategory. --> + <actionGroup ref="MoveCategoryActionGroup" stepKey="MoveCategoryBToNewRootCategory"> + <argument name="childCategory" value="$$createCategoryC.name$$"/> + <argument name="parentCategory" value="$$createNewRootCategoryA.name$$"/> + </actionGroup> + <actionGroup ref="MoveCategoryActionGroup" stepKey="MoveCategoryCToNewRootCategory"> + <argument name="childCategory" value="$$createCategoryB.name$$"/> + <argument name="parentCategory" value="$$createNewRootCategoryA.name$$"/> + </actionGroup> + <!-- Change root category for Main Website Store. --> + <amOnPage stepKey="s1" url="{{AdminSystemStorePage.url}}"/> + <waitForPageLoad stepKey="waitForPageLoad2" /> + <click stepKey="s2" selector="{{AdminStoresGridSection.resetButton}}"/> + <waitForPageLoad stepKey="waitForPageLoad3" time="10"/> + <fillField stepKey="s4" selector="{{AdminStoresGridSection.storeGrpFilterTextField}}" userInput="Main Website Store"/> + <click stepKey="s5" selector="{{AdminStoresGridSection.searchButton}}"/> + <waitForPageLoad stepKey="waitForPageLoad4"/> + <click stepKey="s7" selector="{{AdminStoresGridSection.storeGrpNameInFirstRow}}" /> + <waitForPageLoad stepKey="waitForPageLoad5" /> + <selectOption selector="{{AdminNewStoreGroupSection.storeRootCategoryDropdown}}" userInput="{{NewRootCategory.name}}" stepKey="setNewCategoryForStoreGroup"/> + <click selector="{{AdminNewStoreViewActionsSection.saveButton}}" stepKey="clickSaveStoreGroup"/> + <waitForElementVisible selector="{{AdminConfirmationModalSection.ok}}" stepKey="waitForModal"/> + <see selector="{{AdminConfirmationModalSection.title}}" userInput="Warning message" stepKey="seeWarning"/> + <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="acceptModal" /> + <waitForElementVisible selector="{{AdminStoresGridSection.storeFilterTextField}}" stepKey="waitForPageReload"/> + <see userInput="You saved the store." stepKey="seeSavedMessage"/> + + <!-- Perform cli reindex. --> + <!--<magentoCLI command="indexer:reindex" stepKey="magentoCli"/>--> + + <!-- Delete Default Root Category. --> + <amOnPage url="{{AdminCategoryPage.url}}" stepKey="navigateToCategoryPage2"/> + <waitForPageLoad time="30" stepKey="waitForPageLoad6"/> + <click selector="{{AdminCategorySidebarTreeSection.category('Default Category')}}" stepKey="clickOnDefaultRootCategory"/> + <waitForPageLoad stepKey="waitForPageLoad7" /> + <seeElement selector="{{AdminCategoryMainActionsSection.DeleteButton}}" stepKey="assertDeleteButtonIsPresent1"/> + <click selector="{{AdminCategoryMainActionsSection.DeleteButton}}" stepKey="DeleteDefaultRootCategory"/> + <waitForElementVisible selector="{{AdminCategoryModalSection.ok}}" stepKey="waitForModal1" /> + <click selector="{{AdminCategoryModalSection.ok}}" stepKey="acceptModal1"/> + <waitForElementVisible selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="waitForPageReload1"/> + <!-- Verify categories 1 and 3 their products. --> + <amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnHomePage"/> + <waitForPageLoad stepKey="homeWaitForPageLoad"/> + + <!--<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategoryC.name$$)}}" stepKey="browseClickCategoryC"/>--> + <!--<actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="browseAssertCategoryC">--> + <!--<argument name="category" value="$$createCategoryC$$"/>--> + <!--<!– @TODO: Change to scalar value after MQE-498 is implemented –>--> + <!--<argument name="productCount" value="CONST.two"/>--> + <!--</actionGroup>--> + <!--<actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="browseAssertCategoryProduct1">--> + <!--<argument name="product" value="$$createProduct1$$"/>--> + <!--</actionGroup>--> + + <moveMouseOver selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategoryC.name$$)}}" stepKey="hoverCategory"/> + <waitForElementVisible selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createSubCategory.name$$)}}" stepKey="waitForSubcategory"/> + <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createSubCategory.name$$)}}" stepKey="browseClickSubCategory"/> + <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="browseAssertSubcategory"> + <argument name="category" value="$$createSubCategory$$"/> + <!-- @TODO: Change to scalar value after MQE-498 is implemented --> + <argument name="productCount" value="CONST.one"/> + </actionGroup> + <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="browseAssertCategoryProduct2"> + <argument name="product" value="$$createProduct2$$"/> + </actionGroup> + + <!--<actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="browseAssertCategoryB">--> + <!--<argument name="category" value="$$createCategoryB$$"/>--> + <!--<!– @TODO: Change to scalar value after MQE-498 is implemented –>--> + <!--<argument name="productCount" value="CONST.one"/>--> + <!--</actionGroup>--> + <!--<actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="browseAssertCategoryProduct3">--> + <!--<argument name="product" value="$$createProduct3$$"/>--> + <!--</actionGroup>--> + + <!-- Delete Categories 1(with subcategory) and 3. --> + <amOnPage url="{{AdminCategoryPage.url}}" stepKey="navigateToCategoryPage3"/> + <waitForPageLoad time="30" stepKey="waitForPageLoad8"/> + <actionGroup ref="DeleteCategory" stepKey="deleteCategoryC"> + <argument name="categoryEntity" value="$$createCategoryC$$"/> + </actionGroup> + <actionGroup ref="DeleteCategory" stepKey="deleteCategoryB"> + <argument name="categoryEntity" value="$$createCategoryB$$"/> + </actionGroup> + <!-- Verify categories 1 and 3 are absent --> + <amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnHomePage1"/> + <waitForPageLoad stepKey="homeWaitForPageLoad1"/> + <dontSee selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategoryB.name$$)}}" stepKey="browseClickCategoryB"/> + <dontSee selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategoryC.name$$)}}" stepKey="browseClickCategoryC"/> + <!-- Verify products 1-3 are available on storefront --> + <amOnPage url="{{StorefrontHomePage.url}}$$createProduct1.custom_attributes[url_key]$$.html" stepKey="amOnProduct1Page"/> + <waitForPageLoad stepKey="product1WaitForPageLoad"/> + <actionGroup ref="StorefrontCheckSimpleProductNoDescription" stepKey="browseAssertProduct1Page"> + <argument name="product" value="$$createProduct1$$"/> + </actionGroup> + <amOnPage url="{{StorefrontHomePage.url}}$$createProduct2.custom_attributes[url_key]$$.html" stepKey="amOnProduct2Page"/> + <waitForPageLoad stepKey="product2WaitForPageLoad"/> + <actionGroup ref="StorefrontCheckSimpleProductNoDescription" stepKey="browseAssertProduct2Page"> + <argument name="product" value="$$createProduct2$$"/> + </actionGroup> + <amOnPage url="{{StorefrontHomePage.url}}$$createProduct3.custom_attributes[url_key]$$.html" stepKey="amOnProduct3Page"/> + <waitForPageLoad stepKey="product3WaitForPageLoad"/> + <actionGroup ref="StorefrontCheckSimpleProductNoDescription" stepKey="browseAssertProduct3Page"> + <argument name="product" value="$$createProduct3$$"/> + </actionGroup> + <!-- Rename New Root Category to Default category --> + <amOnPage url="{{AdminCategoryPage.url}}" stepKey="navigateToCategoryPage4"/> + <waitForPageLoad time="30" stepKey="waitForPageLoad9"/> + <click selector="{{AdminCategorySidebarTreeSection.category('$$createNewRootCategoryA.name$$')}}" stepKey="clickOnDefaultRootCategory2"/> + <waitForPageLoad stepKey="waitForPageLoad10" /> + <fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="Default Category" stepKey="enterCategoryName"/> + <click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveCategory"/> + <seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="assertSuccess"/> + </test> +</tests> \ No newline at end of file From c59e4dc5001a8c7b7c86546da4bcc7b3f3830179 Mon Sep 17 00:00:00 2001 From: olysenko <olysenko@magento.com> Date: Tue, 27 Mar 2018 13:33:13 +0300 Subject: [PATCH 2/4] MAGETWO-89382: Automate MAGETWO-46344 MFTF --- .../ActionGroup/MoveCategoryActionGroup.xml | 11 +-- .../StorefrontCategoryActionGroup.xml | 2 +- .../StorefrontProductActionGroup.xml | 13 ---- .../Catalog/Data/ProductData.xml | 15 ++++ .../Catalog/Page/AdminCategoryPage.xml | 1 - .../Section/AdminCategoryModalSection.xml | 2 +- .../AdminCategorySidebarTreeSection.xml | 1 - ...minCategoryWarningMessagesPopupSection.xml | 16 ---- .../Catalog/Test/DeleteCategoriesTest.xml | 76 +++++++++---------- 9 files changed, 61 insertions(+), 76 deletions(-) delete mode 100644 dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryWarningMessagesPopupSection.xml diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/MoveCategoryActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/MoveCategoryActionGroup.xml index d08dc9ad7f893..9a082efa75db6 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/MoveCategoryActionGroup.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/MoveCategoryActionGroup.xml @@ -15,9 +15,10 @@ </arguments> <click stepKey="expandAllCategoriesTree" selector="{{AdminCategorySidebarTreeSection.expandAll}}"/> <waitForAjaxLoad stepKey="waitForCategoriesExpand"/> - <dragAndDrop selector1="{{AdminCategorySidebarTreeSection.category('childCategory')}}" selector2="{{AdminCategorySidebarTreeSection.category('parentCategory')}}" stepKey="moveCategory"/> - <waitForElementVisible selector="{{AdminCategoryWarningMessagesPopupSection.warningMessage}}" stepKey="waitForWarningMessageVisible"/> - <see selector="{{AdminCategoryWarningMessagesPopupSection.warningMessage}}" userInput="This operation can take a long time" stepKey="seeWarningMessage"/> - <click selector="{{AdminCategoryWarningMessagesPopupSection.okButton}}" stepKey="clickOkButtonOnWarningPopup"/> + <dragAndDrop selector1="{{AdminCategorySidebarTreeSection.categoryInTree('childCategory')}}" selector2="{{AdminCategorySidebarTreeSection.categoryInTree('parentCategory')}}" stepKey="moveCategory"/> + <waitForElementVisible selector="{{AdminCategoryModalSection.message}}" stepKey="waitForWarningMessageVisible"/> + <see selector="{{AdminCategoryModalSection.message}}" userInput="This operation can take a long time" stepKey="seeWarningMessage"/> + <click selector="{{AdminCategoryModalSection.ok}}" stepKey="clickOkButtonOnWarningPopup"/> + <waitForPageLoad stepKey="waitForCategoryPageReload"/> </actionGroup> - </actionGroups> \ No newline at end of file +</actionGroups> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontCategoryActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontCategoryActionGroup.xml index af71e1520bf44..3b04df7fdd115 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontCategoryActionGroup.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontCategoryActionGroup.xml @@ -12,7 +12,7 @@ <actionGroup name="StorefrontCheckCategoryActionGroup"> <arguments> <argument name="category"/> - <argument name="productCount"/> + <argument name="productCount" type="string"/> </arguments> <seeInCurrentUrl url="/{{category.custom_attributes[url_key]}}.html" stepKey="checkUrl"/> <seeInTitle userInput="{{category.name}}" stepKey="assertCategoryNameInTitle"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontProductActionGroup.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontProductActionGroup.xml index ddefa1a839804..ffc1687bc9f58 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontProductActionGroup.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/ActionGroup/StorefrontProductActionGroup.xml @@ -23,17 +23,4 @@ <see userInput="{{product.custom_attributes[description]}}" selector="{{StorefrontProductInfoMainSection.productDescription}}" stepKey="assertProductDescription"/> <see userInput="{{product.custom_attributes[short_description]}}" selector="{{StorefrontProductInfoMainSection.productShortDescription}}" stepKey="assertProductShortDescription"/> </actionGroup> - <!-- Check the simple product on the product page without description --> - <actionGroup name="StorefrontCheckSimpleProductNoDescription"> - <arguments> - <argument name="product"/> - </arguments> - <seeInCurrentUrl url="/{{product.custom_attributes[url_key]}}.html" stepKey="checkUrl"/> - <seeInTitle userInput="{{product.name}}" stepKey="AssertProductNameInTitle"/> - <see userInput="{{product.name}}" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="assertProductName"/> - <see userInput="{{product.sku}}" selector="{{StorefrontProductInfoMainSection.productSku}}" stepKey="assertProductSku"/> - <see userInput="${{product.price}}.00" selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="assertProductPrice"/> - <see userInput="IN STOCK" selector="{{StorefrontProductInfoMainSection.productStockStatus}}" stepKey="assertInStock"/> - <seeElement selector="{{StorefrontProductInfoMainSection.AddToCart}}" stepKey="assertAddToCart" /> - </actionGroup> </actionGroups> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductData.xml index 231bcd5b427d2..9090c4669dc24 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductData.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/ProductData.xml @@ -133,4 +133,19 @@ <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> <requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity> </entity> + <entity name="productWithDescription" type="product"> + <data key="sku" unique="suffix">testProductWithDescriptionSku</data> + <data key="type_id">simple</data> + <data key="attribute_set_id">4</data> + <data key="visibility">4</data> + <data key="name" unique="suffix">testProductWithDescriptionName</data> + <data key="price">123.00</data> + <data key="urlKey" unique="suffix">testproductwithdescriptionurlkey</data> + <data key="status">1</data> + <data key="quantity">100</data> + <requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity> + <requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductDescription</requiredEntity> + <requiredEntity type="custom_attribute_array">ApiProductShortDescription</requiredEntity> + </entity> </entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminCategoryPage.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminCategoryPage.xml index 7cb4ca0e7987d..f51d2e8a28939 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminCategoryPage.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Page/AdminCategoryPage.xml @@ -18,6 +18,5 @@ <section name="AdminCategoryProductsGridSection"/> <section name="AdminCategoryModalSection"/> <section name="AdminCategoryMessagesSection"/> - <section name="AdminCategoryWarningMessagesPopupSection"/> </page> </pages> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryModalSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryModalSection.xml index 7435e759e29d1..d36256bf75d81 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryModalSection.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryModalSection.xml @@ -12,6 +12,6 @@ <element name="message" type="text" selector="aside.confirm div.modal-content"/> <element name="title" type="text" selector="aside.confirm .modal-header .modal-title"/> <element name="ok" type="button" selector="aside.confirm .modal-footer .action-primary"/> - <element name="cancel" type="button" selector="aside.confirm .modal-footer .action-dismiss"/> + <element name="cancel" type="button" selector="aside.confirm .modal-footer .action-secondary"/> </section> </sections> \ No newline at end of file diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategorySidebarTreeSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategorySidebarTreeSection.xml index 9c8ee70874372..e914c80c3e6ac 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategorySidebarTreeSection.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategorySidebarTreeSection.xml @@ -14,6 +14,5 @@ <element name="categoryTreeRoot" type="text" selector="div.x-tree-root-node>li.x-tree-node:first-of-type>div.x-tree-node-el:first-of-type" timeout="30"/> <element name="categoryInTree" type="text" selector="//a/span[contains(text(), '{{name}}')]" parameterized="true" timeout="30"/> <element name="categoryInTreeUnderRoot" type="text" selector="//div[@class='x-tree-root-node']/li/ul/li[@class='x-tree-node']/div/a/span[contains(text(), '{{name}}')]" parameterized="true"/> - <element name="category" type="button" selector="//span[contains(text(),'{{var1}}')]" parameterized="true"/> </section> </sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryWarningMessagesPopupSection.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryWarningMessagesPopupSection.xml deleted file mode 100644 index 6f9b0738a451e..0000000000000 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Section/AdminCategoryWarningMessagesPopupSection.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?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="../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd"> - <section name="AdminCategoryWarningMessagesPopupSection"> - <element name="warningMessage" type="text" selector=".modal-inner-wrap .modal-content .message.message-notice"/> - <element name="cancelButton" type="button" selector=".modal-inner-wrap .action-secondary"/> - <element name="okButton" type="button" selector=".modal-inner-wrap .action-primary" timeout="30"/> - </section> -</sections> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/DeleteCategoriesTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/DeleteCategoriesTest.xml index c4de4866519e0..6c8d1885ac8dc 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/DeleteCategoriesTest.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/DeleteCategoriesTest.xml @@ -16,21 +16,21 @@ <description value="Delete categories."/> <severity value="CRITICAL"/> <testCaseId value="MAGETWO-46344"/> - <group value="category"/> + <group value="testNotIsolated"/> </annotations> <before> <createData entity="_defaultCategory" stepKey="createCategoryC"/> - <createData entity="_defaultProduct" stepKey="createProduct1"> + <createData entity="productWithDescription" stepKey="createProduct1"> <requiredEntity createDataKey="createCategoryC"/> </createData> <createData entity="SimpleSubCategory" stepKey="createSubCategory"> <requiredEntity createDataKey="createCategoryC"/> </createData> - <createData entity="_defaultProduct" stepKey="createProduct2"> + <createData entity="productWithDescription" stepKey="createProduct2"> <requiredEntity createDataKey="createSubCategory"/> </createData> <createData entity="_defaultCategory" stepKey="createCategoryB"/> - <createData entity="_defaultProduct" stepKey="createProduct3"> + <createData entity="productWithDescription" stepKey="createProduct3"> <requiredEntity createDataKey="createCategoryB"/> </createData> <createData entity="NewRootCategory" stepKey="createNewRootCategoryA"/> @@ -40,9 +40,9 @@ </after> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/> <amOnPage url="{{AdminCategoryPage.url}}" stepKey="navigateToCategoryPage1"/> - <waitForPageLoad time="30" stepKey="waitForPageLoad1"/> - <click selector="{{AdminCategorySidebarTreeSection.category($$createNewRootCategoryA.name$$)}}" stepKey="openNewRootCategory"/> - <waitForPageLoad stepKey="waitForPageLoad1a"/> + <waitForPageLoad time="30" stepKey="waitForPageCategoryLoadAfterNavigate"/> + <click selector="{{AdminCategorySidebarTreeSection.categoryInTree($$createNewRootCategoryA.name$$)}}" stepKey="openNewRootCategory"/> + <waitForPageLoad stepKey="waitForPageCategoryLoadAfterClickOnNewRootCategory"/> <seeElement selector="{{AdminCategoryMainActionsSection.DeleteButton}}" stepKey="assertDeleteButtonIsPresent"/> <!--Move categories from Default Category to NewRootCategory. --> <actionGroup ref="MoveCategoryActionGroup" stepKey="MoveCategoryBToNewRootCategory"> @@ -55,44 +55,45 @@ </actionGroup> <!-- Change root category for Main Website Store. --> <amOnPage stepKey="s1" url="{{AdminSystemStorePage.url}}"/> - <waitForPageLoad stepKey="waitForPageLoad2" /> + <waitForPageLoad stepKey="waitForPageAdminSystemStoreLoad" /> <click stepKey="s2" selector="{{AdminStoresGridSection.resetButton}}"/> - <waitForPageLoad stepKey="waitForPageLoad3" time="10"/> + <waitForPageLoad stepKey="waitForPageAdminStoresGridLoadAfterResetButton" time="10"/> <fillField stepKey="s4" selector="{{AdminStoresGridSection.storeGrpFilterTextField}}" userInput="Main Website Store"/> <click stepKey="s5" selector="{{AdminStoresGridSection.searchButton}}"/> - <waitForPageLoad stepKey="waitForPageLoad4"/> + <waitForPageLoad stepKey="waitForPageAdminStoresGridLoadAfterSearchButton"/> <click stepKey="s7" selector="{{AdminStoresGridSection.storeGrpNameInFirstRow}}" /> - <waitForPageLoad stepKey="waitForPageLoad5" /> + <waitForPageLoad stepKey="waitForPageAdminStoresGroupEditLoad" /> <selectOption selector="{{AdminNewStoreGroupSection.storeRootCategoryDropdown}}" userInput="{{NewRootCategory.name}}" stepKey="setNewCategoryForStoreGroup"/> <click selector="{{AdminNewStoreViewActionsSection.saveButton}}" stepKey="clickSaveStoreGroup"/> - <waitForElementVisible selector="{{AdminConfirmationModalSection.ok}}" stepKey="waitForModal"/> + <waitForElementVisible selector="{{AdminConfirmationModalSection.ok}}" stepKey="waitForModalSaveStoreGroup"/> <see selector="{{AdminConfirmationModalSection.title}}" userInput="Warning message" stepKey="seeWarning"/> <click selector="{{AdminConfirmationModalSection.ok}}" stepKey="acceptModal" /> - <waitForElementVisible selector="{{AdminStoresGridSection.storeFilterTextField}}" stepKey="waitForPageReload"/> + <waitForElementVisible selector="{{AdminStoresGridSection.storeFilterTextField}}" stepKey="waitForPageAdminStoresGridReload"/> <see userInput="You saved the store." stepKey="seeSavedMessage"/> + <!--<!– @TODO: Uncomment commented below code after MQE-903 is fixed –>--> <!-- Perform cli reindex. --> <!--<magentoCLI command="indexer:reindex" stepKey="magentoCli"/>--> <!-- Delete Default Root Category. --> - <amOnPage url="{{AdminCategoryPage.url}}" stepKey="navigateToCategoryPage2"/> - <waitForPageLoad time="30" stepKey="waitForPageLoad6"/> - <click selector="{{AdminCategorySidebarTreeSection.category('Default Category')}}" stepKey="clickOnDefaultRootCategory"/> - <waitForPageLoad stepKey="waitForPageLoad7" /> + <amOnPage url="{{AdminCategoryPage.url}}" stepKey="navigateToCategoryPageAfterCLIReindexCommand"/> + <waitForPageLoad time="30" stepKey="waitForPageCategoryLoadAfterCLIReindexCommand"/> + <click selector="{{AdminCategorySidebarTreeSection.categoryInTree('Default Category')}}" stepKey="clickOnDefaultRootCategory"/> + <waitForPageLoad stepKey="waitForPageDefaultCategoryEditLoad" /> <seeElement selector="{{AdminCategoryMainActionsSection.DeleteButton}}" stepKey="assertDeleteButtonIsPresent1"/> <click selector="{{AdminCategoryMainActionsSection.DeleteButton}}" stepKey="DeleteDefaultRootCategory"/> - <waitForElementVisible selector="{{AdminCategoryModalSection.ok}}" stepKey="waitForModal1" /> + <waitForElementVisible selector="{{AdminCategoryModalSection.ok}}" stepKey="waitForModalDeleteDefaultRootCategory" /> <click selector="{{AdminCategoryModalSection.ok}}" stepKey="acceptModal1"/> - <waitForElementVisible selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="waitForPageReload1"/> + <waitForElementVisible selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="waitForPageReloadAfterDeleteDefaultCategory"/> <!-- Verify categories 1 and 3 their products. --> <amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnHomePage"/> <waitForPageLoad stepKey="homeWaitForPageLoad"/> + <!--<!– @TODO: Uncomment commented below code after MQE-903 is fixed –>--> <!--<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategoryC.name$$)}}" stepKey="browseClickCategoryC"/>--> <!--<actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="browseAssertCategoryC">--> <!--<argument name="category" value="$$createCategoryC$$"/>--> - <!--<!– @TODO: Change to scalar value after MQE-498 is implemented –>--> - <!--<argument name="productCount" value="CONST.two"/>--> + <!--<argument name="productCount" value="2"/>--> <!--</actionGroup>--> <!--<actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="browseAssertCategoryProduct1">--> <!--<argument name="product" value="$$createProduct1$$"/>--> @@ -103,25 +104,24 @@ <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createSubCategory.name$$)}}" stepKey="browseClickSubCategory"/> <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="browseAssertSubcategory"> <argument name="category" value="$$createSubCategory$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="productCount" value="CONST.one"/> + <argument name="productCount" value="1"/> </actionGroup> <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="browseAssertCategoryProduct2"> <argument name="product" value="$$createProduct2$$"/> </actionGroup> + <!--<!– @TODO: Uncomment commented below code after MQE-903 is fixed –>--> <!--<actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="browseAssertCategoryB">--> <!--<argument name="category" value="$$createCategoryB$$"/>--> - <!--<!– @TODO: Change to scalar value after MQE-498 is implemented –>--> - <!--<argument name="productCount" value="CONST.one"/>--> + <!--<argument name="productCount" value="1"/>--> <!--</actionGroup>--> <!--<actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="browseAssertCategoryProduct3">--> <!--<argument name="product" value="$$createProduct3$$"/>--> <!--</actionGroup>--> <!-- Delete Categories 1(with subcategory) and 3. --> - <amOnPage url="{{AdminCategoryPage.url}}" stepKey="navigateToCategoryPage3"/> - <waitForPageLoad time="30" stepKey="waitForPageLoad8"/> + <amOnPage url="{{AdminCategoryPage.url}}" stepKey="navigateToCategoryPageAfterStoreFrontCategoryAssertions"/> + <waitForPageLoad time="30" stepKey="waitForCategoryPageLoadAfterStoreFrontCategoryAssertions"/> <actionGroup ref="DeleteCategory" stepKey="deleteCategoryC"> <argument name="categoryEntity" value="$$createCategoryC$$"/> </actionGroup> @@ -130,32 +130,32 @@ </actionGroup> <!-- Verify categories 1 and 3 are absent --> <amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnHomePage1"/> - <waitForPageLoad stepKey="homeWaitForPageLoad1"/> + <waitForPageLoad stepKey="waitHomePageLoadAfterDeletingCategories"/> <dontSee selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategoryB.name$$)}}" stepKey="browseClickCategoryB"/> <dontSee selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategoryC.name$$)}}" stepKey="browseClickCategoryC"/> <!-- Verify products 1-3 are available on storefront --> <amOnPage url="{{StorefrontHomePage.url}}$$createProduct1.custom_attributes[url_key]$$.html" stepKey="amOnProduct1Page"/> <waitForPageLoad stepKey="product1WaitForPageLoad"/> - <actionGroup ref="StorefrontCheckSimpleProductNoDescription" stepKey="browseAssertProduct1Page"> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="browseAssertProduct1Page"> <argument name="product" value="$$createProduct1$$"/> </actionGroup> <amOnPage url="{{StorefrontHomePage.url}}$$createProduct2.custom_attributes[url_key]$$.html" stepKey="amOnProduct2Page"/> <waitForPageLoad stepKey="product2WaitForPageLoad"/> - <actionGroup ref="StorefrontCheckSimpleProductNoDescription" stepKey="browseAssertProduct2Page"> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="browseAssertProduct2Page"> <argument name="product" value="$$createProduct2$$"/> </actionGroup> <amOnPage url="{{StorefrontHomePage.url}}$$createProduct3.custom_attributes[url_key]$$.html" stepKey="amOnProduct3Page"/> <waitForPageLoad stepKey="product3WaitForPageLoad"/> - <actionGroup ref="StorefrontCheckSimpleProductNoDescription" stepKey="browseAssertProduct3Page"> + <actionGroup ref="StorefrontCheckSimpleProduct" stepKey="browseAssertProduct3Page"> <argument name="product" value="$$createProduct3$$"/> </actionGroup> <!-- Rename New Root Category to Default category --> - <amOnPage url="{{AdminCategoryPage.url}}" stepKey="navigateToCategoryPage4"/> - <waitForPageLoad time="30" stepKey="waitForPageLoad9"/> - <click selector="{{AdminCategorySidebarTreeSection.category('$$createNewRootCategoryA.name$$')}}" stepKey="clickOnDefaultRootCategory2"/> - <waitForPageLoad stepKey="waitForPageLoad10" /> - <fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="Default Category" stepKey="enterCategoryName"/> - <click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveCategory"/> - <seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="assertSuccess"/> + <amOnPage url="{{AdminCategoryPage.url}}" stepKey="navigateToCategoryPageAfterStoreFrontProductsAssertions"/> + <waitForPageLoad time="30" stepKey="waitForCategoryPageLoadAfterStoreFrontProductsAssertions"/> + <click selector="{{AdminCategorySidebarTreeSection.categoryInTree('$$createNewRootCategoryA.name$$')}}" stepKey="clickOnNewRootCategoryA"/> + <waitForPageLoad stepKey="waitForPageNewRootCategoryALoad" /> + <fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="Default Category" stepKey="enterCategoryNameAsDefaultCategory"/> + <click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveCategoryDefaultCategory"/> + <seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="assertSuccessMessageAfterSaveDefaultCategory"/> </test> </tests> \ No newline at end of file From 7fc27af4dd3434ab9921e77433557b4d121d378e Mon Sep 17 00:00:00 2001 From: olysenko <olysenko@magento.com> Date: Tue, 27 Mar 2018 18:40:25 +0300 Subject: [PATCH 3/4] MAGETWO-89382: Automate MAGETWO-46344 MFTF --- .../FunctionalTest/Catalog/Data/CategoryData.xml | 7 ++++++- .../Catalog/Test/DeleteCategoriesTest.xml | 2 +- .../Catalog/Test/EndToEndB2CGuestUserTest.xml | 12 ++++-------- .../Catalog/Test/EndToEndB2CLoggedInUserTest.xml | 12 ++++-------- .../Checkout/Test/EndToEndB2CGuestUserTest.xml | 6 ++---- .../Checkout/Test/EndToEndB2CLoggedInUserTest.xml | 6 ++---- .../Test/EndToEndB2CGuestUserTest.xml | 3 +-- .../Test/EndToEndB2CLoggedInUserTest.xml | 3 +-- 8 files changed, 21 insertions(+), 30 deletions(-) diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/CategoryData.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/CategoryData.xml index d76c1286f2636..a1147888a74c5 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/CategoryData.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Data/CategoryData.xml @@ -22,7 +22,6 @@ <data key="name_lwr" unique="suffix">simplesubcategory</data> <data key="is_active">true</data> <data key="include_in_menu">true</data> - <var key="parent_id" entityType="category" entityKey="id"/> </entity> <entity name="NewRootCategory" type="category"> <data key="name" unique="suffix">NewRootCategory</data> @@ -31,4 +30,10 @@ <data key="include_in_menu">true</data> <data key="parent_id">1</data> </entity> + <entity name="SubCategoryWithParent" type="category"> + <data key="name" unique="suffix">subCategory</data> + <data key="name_lwr" unique="suffix">subCategory</data> + <data key="is_active">true</data> + <var key="parent_id" entityType="category" entityKey="id" /> + </entity> </entities> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/DeleteCategoriesTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/DeleteCategoriesTest.xml index 6c8d1885ac8dc..166ab1d839a48 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/DeleteCategoriesTest.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/DeleteCategoriesTest.xml @@ -23,7 +23,7 @@ <createData entity="productWithDescription" stepKey="createProduct1"> <requiredEntity createDataKey="createCategoryC"/> </createData> - <createData entity="SimpleSubCategory" stepKey="createSubCategory"> + <createData entity="SubCategoryWithParent" stepKey="createSubCategory"> <requiredEntity createDataKey="createCategoryC"/> </createData> <createData entity="productWithDescription" stepKey="createProduct2"> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/EndToEndB2CGuestUserTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/EndToEndB2CGuestUserTest.xml index 981737770f24b..54782ca8ca530 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/EndToEndB2CGuestUserTest.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/EndToEndB2CGuestUserTest.xml @@ -68,8 +68,7 @@ <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="browseClickCategory"/> <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="browseAssertCategory"> <argument name="category" value="$$createCategory$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="productCount" value="CONST.three"/> + <argument name="productCount" value="3"/> </actionGroup> <!-- Check simple product 1 in category --> <comment userInput="Check simple product 1 in category" stepKey="commentCheckSimpleProductInCategory" /> @@ -120,8 +119,7 @@ <waitForLoadingMaskToDisappear stepKey="waitForCategoryloaded" /> <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory"> <argument name="category" value="$$createCategory$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="productCount" value="CONST.three"/> + <argument name="productCount" value="3"/> </actionGroup> <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="compareAssertSimpleProduct1"> <argument name="product" value="$$createSimpleProduct1$$"/> @@ -147,8 +145,7 @@ <waitForLoadingMaskToDisappear stepKey="waitForCompareCategory1loaded" /> <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory1"> <argument name="category" value="$$createCategory$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="productCount" value="CONST.three"/> + <argument name="productCount" value="3"/> </actionGroup> <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="compareAssertSimpleProduct2"> <argument name="product" value="$$createSimpleProduct2$$"/> @@ -196,8 +193,7 @@ <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategoryBeforeClear" after="commentClearComparisonSidebar"/> <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory2"> <argument name="category" value="$$createCategory$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="productCount" value="CONST.three"/> + <argument name="productCount" value="3"/> </actionGroup> <actionGroup ref="StorefrontClearCompareActionGroup" stepKey="compareClearCompare"/> <comment userInput="End of Comparing Products" stepKey="endOfComparingProducts" /> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/EndToEndB2CLoggedInUserTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/EndToEndB2CLoggedInUserTest.xml index a903290940ced..9bd00ea3aef32 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/EndToEndB2CLoggedInUserTest.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/EndToEndB2CLoggedInUserTest.xml @@ -57,8 +57,7 @@ <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="browseClickCategory" after="commentOpenCategory"/> <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="browseAssertCategory" after="browseClickCategory"> <argument name="category" value="$$createCategory$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="productCount" value="CONST.three"/> + <argument name="productCount" value="3"/> </actionGroup> <!-- Check simple product 1 in category --> <comment userInput="Check simple product 1 in category" stepKey="commentCheckSimpleProductInCategory" after="browseAssertCategory"/> @@ -109,8 +108,7 @@ <waitForLoadingMaskToDisappear stepKey="waitForCategoryloaded" after="compareClickCategory"/> <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory" after="waitForCategoryloaded"> <argument name="category" value="$$createCategory$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="productCount" value="CONST.three"/> + <argument name="productCount" value="3"/> </actionGroup> <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="compareAssertSimpleProduct1" after="compareAssertCategory"> <argument name="product" value="$$createSimpleProduct1$$"/> @@ -136,8 +134,7 @@ <waitForLoadingMaskToDisappear stepKey="waitForCompareCategory1loaded" after="compareClickCategory1"/> <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory1" after="waitForCompareCategory1loaded"> <argument name="category" value="$$createCategory$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="productCount" value="CONST.three"/> + <argument name="productCount" value="3"/> </actionGroup> <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="compareAssertSimpleProduct2" after="compareAssertCategory1"> <argument name="product" value="$$createSimpleProduct2$$"/> @@ -183,8 +180,7 @@ <click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategory.name$$)}}" stepKey="compareClickCategoryBeforeClear" after="commentClearComparisonSidebar"/> <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="compareAssertCategory2" after="compareClickCategoryBeforeClear"> <argument name="category" value="$$createCategory$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="productCount" value="CONST.three"/> + <argument name="productCount" value="3"/> </actionGroup> <actionGroup ref="StorefrontClearCompareActionGroup" stepKey="compareClearCompare" after="compareAssertCategory2"/> <comment userInput="End of Comparing Products" stepKey="endOfComparingProducts" after="compareClearCompare"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/EndToEndB2CGuestUserTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/EndToEndB2CGuestUserTest.xml index d512aebb2c243..8bee75f53c6b2 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/EndToEndB2CGuestUserTest.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/EndToEndB2CGuestUserTest.xml @@ -17,8 +17,7 @@ <waitForLoadingMaskToDisappear stepKey="waitForCartCategoryloaded" after="cartClickCategory"/> <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory" after="waitForCartCategoryloaded"> <argument name="category" value="$$createCategory$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="productCount" value="CONST.three"/> + <argument name="productCount" value="3"/> </actionGroup> <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="cartAssertSimpleProduct1" after="cartAssertCategory"> <argument name="product" value="$$createSimpleProduct1$$"/> @@ -46,8 +45,7 @@ <waitForLoadingMaskToDisappear stepKey="waitForCartCategory1loaded" after="cartClickCategory1"/> <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory1ForSimpleProduct2" after="waitForCartCategory1loaded"> <argument name="category" value="$$createCategory$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="productCount" value="CONST.three"/> + <argument name="productCount" value="3"/> </actionGroup> <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="cartAssertSimpleProduct2" after="cartAssertCategory1ForSimpleProduct2"> <argument name="product" value="$$createSimpleProduct2$$"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/EndToEndB2CLoggedInUserTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/EndToEndB2CLoggedInUserTest.xml index 1cd30954d7f51..74f815181cf9d 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/EndToEndB2CLoggedInUserTest.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Checkout/Test/EndToEndB2CLoggedInUserTest.xml @@ -17,8 +17,7 @@ <waitForLoadingMaskToDisappear stepKey="waitForCartCategoryloaded" after="cartClickCategory"/> <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory" after="waitForCartCategoryloaded"> <argument name="category" value="$$createCategory$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="productCount" value="CONST.three"/> + <argument name="productCount" value="3"/> </actionGroup> <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="cartAssertSimpleProduct1" after="cartAssertCategory"> <argument name="product" value="$$createSimpleProduct1$$"/> @@ -46,8 +45,7 @@ <waitForLoadingMaskToDisappear stepKey="waitForCartCategory1loaded" after="cartClickCategory1"/> <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory1ForSimpleProduct2" after="waitForCartCategory1loaded"> <argument name="category" value="$$createCategory$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="productCount" value="CONST.three"/> + <argument name="productCount" value="3"/> </actionGroup> <actionGroup ref="StorefrontCheckCategorySimpleProduct" stepKey="cartAssertSimpleProduct2" after="cartAssertCategory1ForSimpleProduct2"> <argument name="product" value="$$createSimpleProduct2$$"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/EndToEndB2CGuestUserTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/EndToEndB2CGuestUserTest.xml index d3791f4d52657..d98ab9d50890e 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/EndToEndB2CGuestUserTest.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/EndToEndB2CGuestUserTest.xml @@ -112,8 +112,7 @@ <waitForLoadingMaskToDisappear stepKey="waitForCartCategory2loaded" after="cartClickCategory2"/> <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory1ForConfigurableProduct" after="waitForCartCategory2loaded"> <argument name="category" value="$$createCategory$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="productCount" value="CONST.three"/> + <argument name="productCount" value="3"/> </actionGroup> <actionGroup ref="StorefrontCheckCategoryConfigurableProduct" stepKey="cartAssertConfigProduct" after="cartAssertCategory1ForConfigurableProduct"> <argument name="product" value="$$createConfigProduct$$"/> diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/EndToEndB2CLoggedInUserTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/EndToEndB2CLoggedInUserTest.xml index b1b73d40da144..a75aa8c27f099 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/EndToEndB2CLoggedInUserTest.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/ConfigurableProduct/Test/EndToEndB2CLoggedInUserTest.xml @@ -112,8 +112,7 @@ <waitForLoadingMaskToDisappear stepKey="waitForCartCategory2loaded" after="cartClickCategory2"/> <actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="cartAssertCategory1ForConfigurableProduct" after="waitForCartCategory2loaded"> <argument name="category" value="$$createCategory$$"/> - <!-- @TODO: Change to scalar value after MQE-498 is implemented --> - <argument name="productCount" value="CONST.three"/> + <argument name="productCount" value="3"/> </actionGroup> <actionGroup ref="StorefrontCheckCategoryConfigurableProduct" stepKey="cartAssertConfigProduct" after="cartAssertCategory1ForConfigurableProduct"> <argument name="product" value="$$createConfigProduct$$"/> From d5381fab9e9fb770c40dead8476a11425d0cd76e Mon Sep 17 00:00:00 2001 From: olysenko <olysenko@magento.com> Date: Thu, 29 Mar 2018 11:46:07 +0300 Subject: [PATCH 4/4] MAGETWO-89382: Automate MAGETWO-46344 MFTF --- .../Catalog/Test/DeleteCategoriesTest.xml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/DeleteCategoriesTest.xml b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/DeleteCategoriesTest.xml index 166ab1d839a48..899dc18a6c744 100644 --- a/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/DeleteCategoriesTest.xml +++ b/dev/tests/acceptance/tests/functional/Magento/FunctionalTest/Catalog/Test/DeleteCategoriesTest.xml @@ -11,9 +11,8 @@ <test name="DeleteCategoriesTest"> <annotations> <features value="Delete categories"/> - <stories value="Delete categories"/> <title value="Delete categories."/> - <description value="Delete categories."/> + <description value="Delete Default Root Category and subcategories and vefify after products on storefront."/> <severity value="CRITICAL"/> <testCaseId value="MAGETWO-46344"/> <group value="testNotIsolated"/> @@ -37,6 +36,9 @@ </before> <after> <amOnPage url="admin/admin/auth/logout/" stepKey="amOnLogoutPage"/> + <deleteData createDataKey="createProduct1" stepKey="deleteProduct1"/> + <deleteData createDataKey="createProduct2" stepKey="deleteProduct2"/> + <deleteData createDataKey="createProduct3" stepKey="deleteProduct3"/> </after> <actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin1"/> <amOnPage url="{{AdminCategoryPage.url}}" stepKey="navigateToCategoryPage1"/> @@ -44,7 +46,7 @@ <click selector="{{AdminCategorySidebarTreeSection.categoryInTree($$createNewRootCategoryA.name$$)}}" stepKey="openNewRootCategory"/> <waitForPageLoad stepKey="waitForPageCategoryLoadAfterClickOnNewRootCategory"/> <seeElement selector="{{AdminCategoryMainActionsSection.DeleteButton}}" stepKey="assertDeleteButtonIsPresent"/> - <!--Move categories from Default Category to NewRootCategory. --> + <!--Move categories from Default Category to NewRootCategory. --> <actionGroup ref="MoveCategoryActionGroup" stepKey="MoveCategoryBToNewRootCategory"> <argument name="childCategory" value="$$createCategoryC.name$$"/> <argument name="parentCategory" value="$$createNewRootCategoryA.name$$"/> @@ -71,7 +73,7 @@ <waitForElementVisible selector="{{AdminStoresGridSection.storeFilterTextField}}" stepKey="waitForPageAdminStoresGridReload"/> <see userInput="You saved the store." stepKey="seeSavedMessage"/> - <!--<!– @TODO: Uncomment commented below code after MQE-903 is fixed –>--> + <!-- @TODO: Uncomment commented below code after MQE-903 is fixed --> <!-- Perform cli reindex. --> <!--<magentoCLI command="indexer:reindex" stepKey="magentoCli"/>--> @@ -89,7 +91,7 @@ <amOnPage url="{{StorefrontHomePage.url}}" stepKey="amOnHomePage"/> <waitForPageLoad stepKey="homeWaitForPageLoad"/> - <!--<!– @TODO: Uncomment commented below code after MQE-903 is fixed –>--> + <!-- @TODO: Uncomment commented below code after MQE-903 is fixed --> <!--<click selector="{{StorefrontHeaderSection.NavigationCategoryByName($$createCategoryC.name$$)}}" stepKey="browseClickCategoryC"/>--> <!--<actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="browseAssertCategoryC">--> <!--<argument name="category" value="$$createCategoryC$$"/>--> @@ -110,7 +112,7 @@ <argument name="product" value="$$createProduct2$$"/> </actionGroup> - <!--<!– @TODO: Uncomment commented below code after MQE-903 is fixed –>--> + <!-- @TODO: Uncomment commented below code after MQE-903 is fixed --> <!--<actionGroup ref="StorefrontCheckCategoryActionGroup" stepKey="browseAssertCategoryB">--> <!--<argument name="category" value="$$createCategoryB$$"/>--> <!--<argument name="productCount" value="1"/>-->