Skip to content

Commit 3076e8d

Browse files
committed
Merge branch 'Refactoring-AdminUpdateFlatCategoryAndAddProductsTest' into Refactoring-AdminCreateInactiveFlatCategoryTest
2 parents 64f5457 + c9e0317 commit 3076e8d

File tree

1 file changed

+46
-25
lines changed

1 file changed

+46
-25
lines changed

app/code/Magento/Catalog/Test/Mftf/Test/AdminUpdateFlatCategoryAndAddProductsTest.xml

Lines changed: 46 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -57,39 +57,60 @@
5757
<comment userInput="Adding the comment to replace CliIndexerReindexActionGroup action group ('indexer:reindex' commands) for preserving Backward Compatibility" stepKey="reindexBeforeFlow"/>
5858
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openAdminCategoryIndexPage"/>
5959
<actionGroup ref="AdminExpandCategoryTreeActionGroup" stepKey="clickOnExpandTree"/>
60-
<click selector="{{AdminCategorySidebarTreeSection.categoryInTree(SimpleSubCategory.name)}}" stepKey="selectCreatedCategory"/>
61-
<waitForPageLoad stepKey="waitForTheCategoryPageToLoaded"/>
60+
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="selectCreatedCategory">
61+
<argument name="category" value="SimpleSubCategory"/>
62+
</actionGroup>
63+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForTheCategoryPageToLoaded"/>
6264
<!--Add Products in Category-->
63-
<scrollTo selector="{{AdminCategoryBasicFieldSection.productsInCategory}}" x="0" y="-80" stepKey="scrollToProductInCategory"/>
64-
<click selector="{{AdminCategoryBasicFieldSection.productsInCategory}}" stepKey="clickOnProductInCategory"/>
65-
<scrollToTopOfPage stepKey="scrollOnTopOfPage"/>
66-
<conditionalClick selector="{{CatalogProductsSection.resetFilter}}" dependentSelector="{{CatalogProductsSection.resetFilter}}" visible="true" stepKey="clickOnResetFilter"/>
67-
<waitForPageLoad stepKey="waitForProductsToLoad"/>
68-
<fillField selector="{{AdminCategoryContentSection.productTableColumnName}}" userInput="$$createSimpleProduct.name$$" stepKey="selectProduct"/>
69-
<click selector="{{AdminCategoryContentSection.productSearch}}" stepKey="clickSearchButton"/>
70-
<waitForPageLoad stepKey="waitFroPageToLoad1"/>
71-
<scrollTo selector="{{AdminCategoryContentSection.productTableRow}}" stepKey="scrollToTableRow"/>
72-
<click selector="{{AdminCategoryContentSection.productTableRow}}" stepKey="selectProductFromTableRow"/>
65+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="scrollToProductInCategory"/>
66+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickOnProductInCategory"/>
67+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="scrollOnTopOfPage"/>
68+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickOnResetFilter"/>
69+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForProductsToLoad"/>
70+
<actionGroup ref="AdminAddProductToCategoryActionGroup" stepKey="selectProduct">
71+
<argument name="product" value="$$createSimpleProduct$$"/>
72+
</actionGroup>
73+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickSearchButton"/>
74+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitFroPageToLoad1"/>
75+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="scrollToTableRow"/>
76+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectProductFromTableRow"/>
7377
<actionGroup ref="AdminSaveCategoryActionGroup" stepKey="saveSubCategory"/>
74-
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="seeSuccessMessage"/>
78+
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="seeSuccessMessage">
79+
<argument name="message" value="You saved the category."/>
80+
</actionGroup>
7581
<comment userInput="Adding the comment to replace CliIndexerReindexActionGroup action group ('indexer:reindex' commands) for preserving Backward Compatibility" stepKey="reindex"/>
7682
<comment userInput="Adding the comment to replace CliCacheFlushActionGroup action group ('cache:flush' command) for preserving Backward Compatibility" stepKey="flushCache"/>
7783
<actionGroup ref="AdminOpenIndexManagementPageActionGroup" stepKey="openIndexManagementPage"/>
7884
<see stepKey="seeCategoryIndexStatus" selector="{{AdminIndexManagementSection.indexerStatus('Category Flat Data')}}" userInput="Ready"/>
7985
<!--Verify Product In Store Front-->
80-
<amOnPage url="$$createSimpleProduct.custom_attributes[url_key]$$.html" stepKey="goToStorefrontPage"/>
81-
<waitForPageLoad stepKey="waitForPageToBeLoaded"/>
86+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="goToStorefrontPage">
87+
<argument name="product" value="$createSimpleProduct$"/>
88+
</actionGroup>
8289
<!--Verify product and category is visible in First Store View -->
83-
<click stepKey="selectStoreSwitcher" selector="{{StorefrontHeaderSection.storeViewSwitcher}}"/>
84-
<click stepKey="selectFirstStoreView" selector="{{StorefrontHeaderSection.storeViewList(customStoreEN.name)}}"/>
85-
<waitForPageLoad stepKey="waitForFirstStoreView"/>
86-
<seeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName($$category.name$$)}}" stepKey="seeCategoryOnNavigation"/>
87-
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="{{defaultSimpleProduct.name}}" stepKey="assertProductName"/>
90+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectStoreSwitcher"/>
91+
<actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="selectFirstStoreView">
92+
<argument name="storeView" value="customStoreEN"/>
93+
</actionGroup>
94+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForFirstStoreView"/>
95+
<!--<seeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName($$category.name$$)}}" stepKey="seeCategoryOnNavigation"/>-->
96+
<actionGroup ref="StorefrontAssertCategoryNameIsShownInMenuActionGroup" stepKey="seeCategoryOnNavigation">
97+
<argument name="categoryName" value="$$category.name$$"/>
98+
</actionGroup>
99+
<!--<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="{{defaultSimpleProduct.name}}" stepKey="assertProductName"/>-->
100+
<actionGroup ref="StorefrontAssertProductNameOnProductPageActionGroup" stepKey="assertProductName">
101+
<argument name="productName" value="{{defaultSimpleProduct.name}}"/>
102+
</actionGroup>
88103
<!--Verify product and category is visible in Second Store View -->
89-
<click stepKey="selectStoreSwitcher1" selector="{{StorefrontHeaderSection.storeViewSwitcher}}"/>
90-
<click stepKey="selectSecondStoreView" selector="{{StorefrontHeaderSection.storeViewList(customStoreFR.name)}}"/>
91-
<waitForPageLoad stepKey="waitForSecondStoreView"/>
92-
<seeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName($$category.name$$)}}" stepKey="seeCategoryOnNavigation1"/>
93-
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="{{defaultSimpleProduct.name}}" stepKey="seeProductName"/>
104+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="selectStoreSwitcher1"/>
105+
<actionGroup ref="StorefrontSwitchStoreViewActionGroup" stepKey="selectSecondStoreView">
106+
<argument name="storeView" value="customStoreFR"/>
107+
</actionGroup>
108+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSecondStoreView"/>
109+
<actionGroup ref="StorefrontAssertCategoryNameIsShownInMenuActionGroup" stepKey="seeCategoryOnNavigation1">
110+
<argument name="categoryName" value="$$category.name$"/>
111+
</actionGroup>
112+
<actionGroup ref="StorefrontAssertProductNameOnProductPageActionGroup" stepKey="seeProductName">
113+
<argument name="productName" value="{{defaultSimpleProduct.name}}"/>
114+
</actionGroup>
94115
</test>
95116
</tests>

0 commit comments

Comments
 (0)