Skip to content

Commit

Permalink
Refactoring AdminUpdateCategoryAndMakeInactiveTest
Browse files Browse the repository at this point in the history
  • Loading branch information
kate-kyzyma committed Sep 9, 2020
1 parent c7f6564 commit 17ef4a7
Showing 1 changed file with 16 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openAdminCategoryIndexPage"/>

<!--Update category and make category inactive-->
<actionGroup ref="AdminExpandCategoryTreeActionGroup" stepKey="clickOnExpandTree"/>
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree(_defaultCategory.name)}}" stepKey="selectCreatedCategory"/>
<click selector="{{AdminCategoryBasicFieldSection.enableCategoryLabel}}" stepKey="disableCategory"/>
<actionGroup ref="NavigateToCreatedCategoryActionGroup" stepKey="navigateToCreatedCategory">
<argument name="Category" value="$$createDefaultCategory$$"/>
</actionGroup>
<actionGroup ref="AdminDisableActiveCategoryActionGroup" stepKey="disableCategory"/>
<actionGroup ref="AdminSaveCategoryActionGroup" stepKey="clickSaveButton"/>
<actionGroup ref="AssertAdminCategorySaveSuccessMessageActionGroup" stepKey="assertSuccessMessage"/>
<actionGroup ref="AssertAdminCategoryPageTitleActionGroup" stepKey="seePageTitle">
Expand All @@ -47,11 +48,17 @@
</actionGroup>

<!--Verify Inactive Category in category page -->
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openAdminCategoryIndexPage1"/>
<actionGroup ref="AdminExpandCategoryTreeActionGroup" stepKey="clickOnExpandTree1"/>
<seeElement selector="{{AdminCategoryContentSection.categoryInTree(_defaultCategory.name)}}" stepKey="assertCategoryInTree" />
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree(_defaultCategory.name)}}" stepKey="selectCreatedCategory1"/>
<see selector="{{AdminCategoryContentSection.categoryPageTitle}}" userInput="{{_defaultCategory.name}}" stepKey="seeCategoryPageTitle1" />
<dontSeeCheckboxIsChecked selector="{{AdminCategoryBasicFieldSection.EnableCategory}}" stepKey="assertCategoryIsInactive"/>
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="goToAdminCategoryIndexPage"/>
<actionGroup ref="AdminExpandCategoryTreeActionGroup" stepKey="expandCategoryTree"/>
<actionGroup ref="AssertAdminCategoryIsListedInCategoriesTreeActionGroup" stepKey="seeCategoryInTree">
<argument name="categoryName" value="$$createDefaultCategory.name$$"/>
</actionGroup>
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="openCategory">
<argument name="category" value="$$createDefaultCategory$$"/>
</actionGroup>
<actionGroup ref="AssertAdminCategoryPageTitleActionGroup" stepKey="seeCategoryPageTitle">
<argument name="categoryName" value="$$createDefaultCategory.name$$"/>
</actionGroup>
<actionGroup ref="AssertAdminCategoryIsInactiveActionGroup" stepKey="assertCategoryIsInactive"/>
</test>
</tests>

0 comments on commit 17ef4a7

Please sign in to comment.