Skip to content

[MFTF] Repetitive elements replaced by AdminCategoriesOpenCategoryActionGroup #35046

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: 2.4-develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,10 @@
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openAdminCategoryIndexPage"/>
<!--Create subcategory under parent category -->
<actionGroup ref="AdminExpandCategoryTreeActionGroup" stepKey="clickOnExpandTree"/>
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree($$createCategory.name$$)}}" stepKey="selectCategory"/>
<waitForPageLoad stepKey="waitForPageToLoad"/>
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="selectCategory">
<argument name="category" value="$$createCategory$$"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageToLoad"/>
<click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickOnAddSubCategoryButton"/>
<fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="{{SimpleSubCategory.name}}" stepKey="addSubCategoryName"/>
<checkOption selector="{{AdminCategoryBasicFieldSection.EnableCategory}}" stepKey="enableCategory"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@
<comment userInput="Open Category Page and select created category" stepKey="commentOpenCategoryPage"/>
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openAdminCategoryIndexPage"/>
<actionGroup ref="AdminExpandCategoryTreeActionGroup" stepKey="clickOnExpandTree"/>
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree(_defaultCategory.name)}}" stepKey="selectCreatedCategory"/>
<waitForPageLoad stepKey="waitForPageToLoaded2"/>
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="selectCreatedCategory"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageToLoaded2"/>
<!--Select Products-->
<comment userInput="Select Products" stepKey="commentSelectProducts"/>
<scrollTo selector="{{AdminCategoryBasicFieldSection.productsInCategory}}" x="0" y="-80" stepKey="scrollToProductInCategory"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
</before>
<after>
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="goToCategoryPage"/>
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree(FirstLevelSubCat.name)}}" stepKey="clickCategoryLink"/>
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="clickCategoryLink">
<argument name="category" value="FirstLevelSubCat"/>
</actionGroup>
<click selector="{{AdminCategoryMainActionsSection.DeleteButton}}" stepKey="clickDelete"/>
<waitForElementVisible selector="{{AdminCategoryModalSection.message}}" stepKey="waitForConfirmationModal"/>
<see selector="{{AdminCategoryModalSection.message}}" userInput="Are you sure you want to delete this category?" stepKey="seeDeleteConfirmationMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@
<!-- Select created category and make category inactive-->
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openAdminCategoryIndexPage"/>
<actionGroup ref="AdminExpandCategoryTreeActionGroup" stepKey="clickOnExpandTree"/>
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree(CatNotActive.name)}}" stepKey="selectCreatedCategory"/>
<waitForPageLoad stepKey="waitForCategoryPageToLoad"/>
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="selectCreatedCategory">
<argument name="category" value="CatNotActive"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForCategoryPageToLoad"/>
<actionGroup ref="AdminSaveCategoryActionGroup" stepKey="saveSubCategory"/>
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="seeSuccessMessage"/>
<see selector="{{AdminCategoryContentSection.categoryPageTitle}}" userInput="{{CatNotActive.name}}" stepKey="seeUpdatedCategoryTitle"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@
<actionGroup ref="CreateCategoryActionGroup" stepKey="createSubcategory1">
<argument name="categoryEntity" value="SimpleSubCategory"/>
</actionGroup>
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree(NewRootCategory.name)}}" stepKey="clickOnCreatedNewRootCategory1"/>
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="clickOnCreatedNewRootCategory1">
<argument name="category" value="NewRootCategory"/>
</actionGroup>
<scrollToTopOfPage stepKey="scrollToTopOfPage3"/>
<!--Create another subcategory-->
<actionGroup ref="CreateCategoryActionGroup" stepKey="createSubcategory2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openAdminCategoryIndexPage1"/>
<scrollToTopOfPage stepKey="scrollToTopOfPage2"/>
<actionGroup ref="AdminExpandCategoryTreeActionGroup" stepKey="expandToSeeAllCategories"/>
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree(NewRootCategory.name))}}" stepKey="clickRootCategoryInTree"/>
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="clickRootCategoryInTree">
<argument name="category" value="NewRootCategory"/>
</actionGroup>

<!--Verify Delete button is not displayed-->
<dontSeeElement selector="{{AdminCategoryMainActionsSection.DeleteButton}}" stepKey="dontSeeDeleteButton"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@
</after>
<!-- Step 1-2: Open Category page and Set scope selector to All Store Views-->
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="goToCategoryPage"/>
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree($$createCategory.name$$)}}"
stepKey="clickCategoryName"/>
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="clickCategoryName">
<argument name="category" value="$$createCategory$$"/>
</actionGroup>
<click selector="{{AdminCategoryProductsSection.sectionHeader}}" stepKey="openProductSection"/>
<grabTextFrom selector="{{AdminCategorySidebarTreeSection.categoryInTree($$createCategory.name$$)}}"
stepKey="grabTextFromCategory"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
<!--Open Category Page-->
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openAdminCategoryIndexPage"/>
<actionGroup ref="AdminExpandCategoryTreeActionGroup" stepKey="clickOnExpandTree"/>
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree(_defaultCategory.name)}}" stepKey="selectCategory"/>
<waitForPageLoad stepKey="waitForPageToLoad"/>
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="selectCategory"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageToLoad"/>

<!--Enable Anchor for _defaultCategory Category-->
<scrollTo selector="{{CategoryDisplaySettingsSection.DisplaySettingTab}}" x="0" y="-80" stepKey="scrollToDisplaySetting"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@
<!--Open category page-->
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openAdminCategoryIndexPage"/>
<actionGroup ref="AdminExpandCategoryTreeActionGroup" stepKey="clickOnExpandTree"/>
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree(FirstLevelSubCat.name)}}" stepKey="selectCategory"/>
<waitForPageLoad stepKey="waitForPageToLoad"/>
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="selectCategory">
<argument name="category" value="FirstLevelSubCat"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageToLoad"/>

<!--Create second level category-->
<click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickOnAddSubCategoryButton"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
<!--Open Category page-->
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openAdminCategoryIndexPage"/>
<actionGroup ref="AdminExpandCategoryTreeActionGroup" stepKey="clickOnExpandTree"/>
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree(_defaultCategory.name)}}" stepKey="selectCategory"/>
<waitForPageLoad stepKey="waitForPageToLoad"/>
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="selectCategory"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageToLoad"/>

<!--Enable Anchor for _defaultCategory category -->
<scrollTo selector="{{CategoryDisplaySettingsSection.DisplaySettingTab}}" x="0" y="-80" stepKey="scrollToDisplaySetting"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
<!-- Open Category Page -->
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openAdminCategoryIndexPage"/>
<actionGroup ref="AdminExpandCategoryTreeActionGroup" stepKey="clickExpandTree"/>
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree(_defaultCategory.name)}}" stepKey="selectCategory"/>
<waitForPageLoad stepKey="waitForPageToLoad"/>
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="selectCategory"/>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageToLoad"/>
<!-- Create three level deep sub Category -->
<click selector="{{AdminCategorySidebarActionSection.AddSubcategoryButton}}" stepKey="clickAddSubCategoryButton"/>
<waitForPageLoad stepKey="waitForAddSubCategoryClick1"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,10 @@
<!--Update Category-->
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openAdminCategoryIndexPage"/>
<actionGroup ref="AdminExpandCategoryTreeActionGroup" stepKey="clickOnExpandTree"/>
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree(SimpleRootSubCategory.name)}}" stepKey="selectCategory"/>
<waitForPageLoad stepKey="waitForPageToLoad"/>
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="selectCategory">
<argument name="category" value="SimpleRootSubCategory"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageToLoad"/>
<fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="{{_defaultCategory.name}}" stepKey="updateCategoryName"/>
<actionGroup ref="AdminSaveCategoryActionGroup" stepKey="saveUpdatedCategory"/>
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="seeSuccessMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

<!--Update Category name,description, urlKey, meta title and disable Include in Menu-->
<actionGroup ref="AdminExpandCategoryTreeActionGroup" stepKey="clickOnExpandTree"/>
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree(_defaultCategory.name)}}" stepKey="selectCreatedCategory"/>
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="selectCreatedCategory"/>
<fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="{{SimpleRootSubCategory.name}}" stepKey="fillCategoryName"/>
<checkOption selector="{{AdminCategoryBasicFieldSection.EnableCategory}}" stepKey="enableCategory"/>
<click selector="{{AdminCategoryBasicFieldSection.includeInMenuLabel}}" stepKey="disableIncludeInMenu"/>
Expand Down Expand Up @@ -66,8 +66,10 @@
<!--Verify Updated fields in Category Page-->
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openAdminCategoryIndexPage1"/>
<actionGroup ref="AdminExpandCategoryTreeActionGroup" stepKey="clickOnExpandTree1"/>
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree(SimpleRootSubCategory.name)}}" stepKey="selectCreatedCategory1"/>
<waitForPageLoad stepKey="waitForCategoryPageToLoad"/>
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="selectCreatedCategory1">
<argument name="category" value="SimpleRootSubCategory"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForCategoryPageToLoad"/>
<see selector="{{AdminCategoryContentSection.categoryPageTitle}}" userInput="{{SimpleRootSubCategory.name}}" stepKey="seeUpdatedCategoryTitle"/>
<dontSeeCheckboxIsChecked selector="{{AdminCategoryBasicFieldSection.includeInMenuLabel}}" stepKey="verifyInactiveIncludeInMenu"/>
<seeInField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="{{SimpleRootSubCategory.name}}" stepKey="seeUpdatedCategoryName"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<!--Open Category Page-->
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openAdminCategoryIndexPage"/>
<actionGroup ref="AdminExpandCategoryTreeActionGroup" stepKey="clickOnExpandTree"/>
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree(_defaultCategory.name)}}" stepKey="selectCreatedCategory"/>
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="selectCreatedCategory"/>
<checkOption selector="{{AdminCategoryBasicFieldSection.EnableCategory}}" stepKey="enableCategory"/>

<!--Update Product Display Setting-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@
<!-- Select created category and enable Include In Menu option-->
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openAdminCategoryIndexPage"/>
<actionGroup ref="AdminExpandCategoryTreeActionGroup" stepKey="clickOnExpandTree"/>
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree(CatNotIncludeInMenu.name)}}" stepKey="selectCreatedCategory"/>
<waitForPageLoad stepKey="waitForCategoryPageToLoad"/>
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="selectCreatedCategory">
<argument name="category" value="CatNotIncludeInMenu"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForCategoryPageToLoad"/>
<click selector="{{AdminCategoryBasicFieldSection.includeInMenuLabel}}" stepKey="enableIncludeInMenuOption"/>
<actionGroup ref="AdminSaveCategoryActionGroup" stepKey="saveSubCategory"/>
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="seeSuccessMessage"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@
<!--Search default simple product in the grid page -->
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="OpenCategoryCatalogPage"/>
<actionGroup ref="AdminExpandCategoryTreeActionGroup" stepKey="clickExpandTree"/>
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree($$initialCategoryEntity.name$$)}}" stepKey="selectCategory"/>
<waitForPageLoad stepKey="waitForPageToLoad"/>
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="selectCategory">
<argument name="category" value="$$initialCategoryEntity$$"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageToLoad"/>
<click selector="{{AdminCategoryProductsSection.sectionHeader}}" stepKey="clickAdminCategoryProductSection"/>
<waitForPageLoad stepKey="waitForSectionHeaderToLoad"/>
<dontSee selector="{{AdminCategoryProductsGridSection.rowProductName($$initialSimpleProduct.name$$)}}" stepKey="dontSeeProductNameOnCategoryCatalogPage"/>
Expand Down
18 changes: 12 additions & 6 deletions app/code/Magento/Catalog/Test/Mftf/Test/DeleteCategoriesTest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@
</after>
<comment userInput="BIC workaround" stepKey="loginAsAdmin1"/>
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="navigateToCategoryPage1"/>
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree($$createNewRootCategoryA.name$$)}}" stepKey="openNewRootCategory"/>
<waitForPageLoad stepKey="waitForPageCategoryLoadAfterClickOnNewRootCategory"/>
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="openNewRootCategory">
<argument name="category" value="$$createNewRootCategoryA$$"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageCategoryLoadAfterClickOnNewRootCategory"/>
<seeElement selector="{{AdminCategoryMainActionsSection.DeleteButton}}" stepKey="assertDeleteButtonIsPresent"/>
<!--Move categories from Default Category to NewRootCategory. -->
<actionGroup ref="MoveCategoryActionGroup" stepKey="MoveCategoryBToNewRootCategory">
Expand Down Expand Up @@ -83,8 +85,10 @@

<!-- Delete Default Root Category. -->
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="navigateToCategoryPageAfterCLIReindexCommand"/>
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree('Default Category')}}" stepKey="clickOnDefaultRootCategory"/>
<waitForPageLoad stepKey="waitForPageDefaultCategoryEditLoad" />
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="clickOnDefaultRootCategory">
<argument name="category" value="Default Category"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageDefaultCategoryEditLoad"/>
<seeElement selector="{{AdminCategoryMainActionsSection.DeleteButton}}" stepKey="assertDeleteButtonIsPresent1"/>
<click selector="{{AdminCategoryMainActionsSection.DeleteButton}}" stepKey="DeleteDefaultRootCategory"/>
<waitForElementVisible selector="{{AdminCategoryModalSection.ok}}" stepKey="waitForModalDeleteDefaultRootCategory" />
Expand Down Expand Up @@ -153,8 +157,10 @@
</actionGroup>
<!-- Rename New Root Category to Default category -->
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="navigateToCategoryPageAfterStoreFrontProductsAssertions"/>
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree('$$createNewRootCategoryA.name$$')}}" stepKey="clickOnNewRootCategoryA"/>
<waitForPageLoad stepKey="waitForPageNewRootCategoryALoad" />
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="clickOnNewRootCategoryA">
<argument name="category" value="$$createNewRootCategoryA$$"/>
</actionGroup>
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageNewRootCategoryALoad"/>
<fillField selector="{{AdminCategoryBasicFieldSection.CategoryNameInput}}" userInput="Default Category" stepKey="enterCategoryNameAsDefaultCategory"/>
<actionGroup ref="AdminSaveCategoryActionGroup" stepKey="saveCategoryDefaultCategory"/>
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="assertSuccessMessageAfterSaveDefaultCategory"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
<argument name="categoryEntity" value="_defaultCategory"/>
</actionGroup>
<!--Create category under newly created category-->
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree(_defaultCategory.name)}}" stepKey="clickCreatedCategoryInTree"/>
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="clickCreatedCategoryInTree"/>
<actionGroup ref="CreateCategoryActionGroup" stepKey="createSubCategory">
<argument name="categoryEntity" value="SimpleSubCategory"/>
</actionGroup>
Expand Down
Loading