Skip to content

Commit b089da5

Browse files
[AC-4613] Move and Update Category on Store View level when Category Flat Indexer is in Update on Save mode
fixed pr comments
1 parent 519df1a commit b089da5

6 files changed

+19
-65
lines changed

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminUpdateCategoryDescriptionActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<scrollTo selector="{{AdminCategoryContentSection.sectionHeader}}" x="0" y="-80" stepKey="scrollToContent"/>
1717
<click selector="{{AdminCategoryContentSection.sectionHeader}}" stepKey="selectContent"/>
1818
<scrollTo selector="{{AdminCategoryContentSection.description}}" x="0" y="-80" stepKey="scrollToDescription"/>
19+
<conditionalClick selector="{{AdminCategoryContentSection.categoryDescriptionUseDefault}}" dependentSelector="{{AdminCategoryContentSection.categoryDescriptionUseDefault}}" visible="true" stepKey="uncheckUseDefaultValueStoreView"/>
1920
<fillField selector="{{AdminCategoryContentSection.description}}" userInput="{{description}}" stepKey="fillUpdatedDescription"/>
2021
</actionGroup>
2122
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminUpdateCategoryDescriptionAtStoreViewLevelActionGroup.xml

Lines changed: 0 additions & 23 deletions
This file was deleted.

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminUpdateCategoryDisplaySettingsActionGroup.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@
1111
<description>Update Category Display settings</description>
1212
</annotations>
1313
<arguments>
14-
<argument name="availableSortOptions" type="string"/>
15-
<argument name="defaultSortingOption" type="string"/>
16-
<argument name="priceRange" type="string"/>
14+
<argument name="availableSortOptions" type="string" defaultValue="Position"/>
15+
<argument name="defaultSortingOption" type="string" defaultValue="position"/>
16+
<argument name="priceRange" type="string" defaultValue="1"/>
1717
</arguments>
1818
<!--Select Display Setting and fill the options-->
1919
<scrollTo selector="{{CategoryDisplaySettingsSection.DisplaySettingTab}}" x="0" y="-80" stepKey="scrollToDisplaySetting"/>
2020
<click selector="{{CategoryDisplaySettingsSection.DisplaySettingTab}}" stepKey="selectDisplaySetting"/>
21-
<click selector="{{CategoryDisplaySettingsSection.productListCheckBox}}" stepKey="enableTheAvailableProductList"/>
21+
<checkOption selector="{{CategoryDisplaySettingsSection.productListCheckBox}}" stepKey="enableTheAvailableProductList"/>
2222
<selectOption selector="{{CategoryDisplaySettingsSection.productList}}" parameterArray="[{{availableSortOptions}}]" stepKey="selectPrice"/>
2323
<scrollTo selector="{{CategoryDisplaySettingsSection.defaultProductLisCheckBox}}" x="0" y="-80" stepKey="scrollToDefaultProductList"/>
24-
<click selector="{{CategoryDisplaySettingsSection.defaultProductLisCheckBox}}" stepKey="enableTheDefaultProductList"/>
24+
<checkOption selector="{{CategoryDisplaySettingsSection.defaultProductLisCheckBox}}" stepKey="enableTheDefaultProductList"/>
2525
<selectOption selector="{{CategoryDisplaySettingsSection.defaultProductList}}" userInput="{{defaultSortingOption}}" stepKey="selectPosition"/>
2626
<scrollTo selector="{{CategoryDisplaySettingsSection.layeredNavigationPriceCheckBox}}" x="0" y="-80" stepKey="scrollToLayeredNavPrice"/>
2727
<click selector="{{CategoryDisplaySettingsSection.layeredNavigationPriceCheckBox}}" stepKey="enableLayeredNavigationPrice"/>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminUpdateCategoryMetaInformationActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
</arguments>
1616
<scrollTo selector="{{AdminCategorySEOSection.SectionHeader}}" x="0" y="-80" stepKey="scrollToSearchEngineOptimization"/>
1717
<click selector="{{AdminCategorySEOSection.SectionHeader}}" stepKey="selectSearchEngineOptimization"/>
18+
<conditionalClick selector="{{AdminCategorySEOSection.MetaTitleDefaultValueCheckbox}}" dependentSelector="{{AdminCategorySEOSection.MetaTitleDefaultValueCheckbox}}" visible="true" stepKey="uncheckUseDefaultValueStoreView"/>
1819
<waitForElementVisible selector="{{AdminCategorySEOSection.MetaTitleInput}}" stepKey="waitForElementVisible"/>
1920
<fillField selector="{{AdminCategorySEOSection.MetaTitleInput}}" userInput="{{metaTitle}}" stepKey="fillUpdatedMetaTitle"/>
2021
</actionGroup>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminUpdateCategoryMetaInformationAtStoreViewLevelActionGroup.xml

Lines changed: 0 additions & 23 deletions
This file was deleted.

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

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@
1515
<severity value="MAJOR"/>
1616
<testCaseId value="AC-4613"/>
1717
<group value="catalog"/>
18+
<group value="WYSIWYGDisabled"/>
1819
</annotations>
1920
<before>
20-
<!-- Set indexer on save-->
21-
<magentoCLI stepKey="setIndexerMode" command="indexer:set-mode" arguments="realtime" />
2221
<!--set catalog flat category to yes-->
2322
<magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 1"/>
2423
<createData entity="ApiCategory" stepKey="categoryA"/>
@@ -36,8 +35,6 @@
3635
<requiredEntity createDataKey="categoryC"/>
3736
</createData>
3837
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
39-
<!--disable wysiwyg-->
40-
<actionGroup ref="AdminDisableWYSIWYGActionGroup" stepKey="disableWYSIWYG"/>
4138
<!--open category in BE-->
4239
<!-- update category A details-->
4340
<actionGroup ref="GoToAdminCategoryPageByIdActionGroup" stepKey="goToAdminCategoryPageA">
@@ -50,8 +47,8 @@
5047
</actionGroup>
5148
<!--Select Display Setting and fill the options-->
5249
<actionGroup ref="AdminUpdateCategoryDisplaySettingsActionGroup" stepKey="addCategoryDisplaySettingA">
53-
<argument name="availableSortOptions" value="Position"/>
54-
<argument name="defaultSortingOption" value="position"/>
50+
<argument name="availableSortOptions" value="Product Name"/>
51+
<argument name="defaultSortingOption" value="name"/>
5552
<argument name="priceRange" value="5.5"/>
5653
</actionGroup>
5754
<!--Update meta title-->
@@ -62,7 +59,7 @@
6259
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="seeSuccessMessageA">
6360
<argument name="message" value="You saved the category."/>
6461
</actionGroup>
65-
<!-- update category C details-->
62+
<!--update category C details-->
6663
<actionGroup ref="GoToAdminCategoryPageByIdActionGroup" stepKey="goToAdminCategoryPageC">
6764
<argument name="id" value="$categoryC.id$"/>
6865
</actionGroup>
@@ -73,8 +70,8 @@
7370
</actionGroup>
7471
<!--Select Display Setting and fill the options-->
7572
<actionGroup ref="AdminUpdateCategoryDisplaySettingsActionGroup" stepKey="addCategoryDisplaySettingC">
76-
<argument name="availableSortOptions" value="Position"/>
77-
<argument name="defaultSortingOption" value="position"/>
73+
<argument name="availableSortOptions" value="Product Name"/>
74+
<argument name="defaultSortingOption" value="name"/>
7875
<argument name="priceRange" value="5.5"/>
7976
</actionGroup>
8077
<!--Update meta title-->
@@ -87,6 +84,7 @@
8784
</actionGroup>
8885
</before>
8986
<after>
87+
<magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 0 "/>
9088
<deleteData createDataKey="categoryB" stepKey="deleteSimpleCategoryB"/>
9189
<deleteData createDataKey="categoryA" stepKey="deleteSimpleCategoryA"/>
9290
<deleteData createDataKey="categoryC" stepKey="deleteSimpleCategoryC"/>
@@ -106,7 +104,7 @@
106104
<waitForText userInput="Updated CategoryA Description" selector="{{StorefrontCategoryMainSection.CatalogDescriptionWithoutPTag}}" stepKey="assertCatalogDescriptionA"/>
107105
<!-- assert title-->
108106
<waitForElement selector="{{StorefrontCategoryHeadSection.pageTitle('MetaAtitle')}}" stepKey="assertCatalogMetaTitleA"/>
109-
<waitForText userInput="2" selector="{{StorefrontCategoryMainSection.productCount}} span" stepKey="assertProductCount1stTimeA"/>
107+
<waitForText userInput="2" selector="{{StorefrontCategoryMainSection.productCount}}" stepKey="assertProductCount1stTimeA"/>
110108
<!-- Move CategoryA under CategoryC and click ok button-->
111109
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="navigateToAdminCategoryPage1"/>
112110
<actionGroup ref="MoveCategoryActionGroup" stepKey="moveCategoryAUnderCategoryC">
@@ -128,7 +126,7 @@
128126
<waitForElementVisible selector="{{StorefrontCategoryMainSection.imageSource(ProductImage.filename)}}" stepKey="seeImageA1"/>
129127
<waitForText userInput="Updated CategoryA Description" selector="{{StorefrontCategoryMainSection.CatalogDescriptionWithoutPTag}}" stepKey="assertCatalogDescriptionA1"/>
130128
<waitForElement selector="{{StorefrontCategoryHeadSection.pageTitle('MetaAtitle')}}" stepKey="assertCatalogMetaTitleA1"/>
131-
<waitForText userInput="2" selector="{{StorefrontCategoryMainSection.productCount}} span" stepKey="assertProductCount2ndTimeA1"/>
129+
<waitForText userInput="2" selector="{{StorefrontCategoryMainSection.productCount}}" stepKey="assertProductCount2ndTimeA1"/>
132130
<!-- Move CategoryB under CategoryC and click ok button-->
133131
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="navigateToAdminCategoryPage2"/>
134132
<actionGroup ref="MoveCategoryActionGroup" stepKey="moveCategoryBUnderCategoryC">
@@ -150,7 +148,7 @@
150148
<waitForElementVisible selector="{{StorefrontCategoryMainSection.imageSource(ProductImage.filename)}}" stepKey="seeImageC"/>
151149
<waitForText userInput="Updated CategoryC Description" selector="{{StorefrontCategoryMainSection.CatalogDescriptionWithoutPTag}}" stepKey="assertCatalogDescriptionC"/>
152150
<waitForElement selector="{{StorefrontCategoryHeadSection.pageTitle('MetaCtitle')}}" stepKey="assertCatalogMetaTitleC"/>
153-
<waitForText userInput="1" selector="{{StorefrontCategoryMainSection.productCount}} span" stepKey="assertProductCount3rdTimeC"/>
151+
<waitForText userInput="1" selector="{{StorefrontCategoryMainSection.productCount}}" stepKey="assertProductCount3rdTimeC"/>
154152
<!--Create a Store-->
155153
<actionGroup ref="CreateCustomStoreActionGroup" stepKey="createCustomStore">
156154
<argument name="website" value="{{_defaultWebsite.name}}"/>
@@ -176,7 +174,7 @@
176174
<argument name="categoryName" value="Категория А"/>
177175
</actionGroup>
178176
<!--Update category A description-->
179-
<actionGroup ref="AdminUpdateCategoryDescriptionAtStoreViewLevelActionGroup" stepKey="addCategoryDescriptionC1">
177+
<actionGroup ref="AdminUpdateCategoryDescriptionActionGroup" stepKey="addCategoryDescriptionC1">
180178
<argument name="description" value="Другое описание категории А"/>
181179
</actionGroup>
182180
<!--Update category A image -->
@@ -188,7 +186,7 @@
188186
<argument name="value" value="kategoriya-A"/>
189187
</actionGroup>
190188
<!--Update category A meta title-->
191-
<actionGroup ref="AdminUpdateCategoryMetaInformationAtStoreViewLevelActionGroup" stepKey="addCategoryMetaTitleC">
189+
<actionGroup ref="AdminUpdateCategoryMetaInformationActionGroup" stepKey="addCategoryMetaTitleC">
192190
<argument name="metaTitle" value="Категория А"/>
193191
</actionGroup>
194192
<actionGroup ref="AdminSaveCategoryActionGroup" stepKey="saveCategoryA"/>

0 commit comments

Comments
 (0)