Skip to content

Commit 45e81c2

Browse files
ACQE-8247: Move and Update Category on Store View level when Category Flat Indexer is in Update on Schedule mode
- Updated the comments for delete block
1 parent 91d166c commit 45e81c2

File tree

4 files changed

+16
-9
lines changed

4 files changed

+16
-9
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* All Rights Reserved.
66
*/
77
-->
8+
89
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
910
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1011
<actionGroup name="AdminUpdateCategoryDisplaySettingsWithCustomValuesActionGroup"

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@
55
* All Rights Reserved.
66
*/
77
-->
8+
89
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
910
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1011
<actionGroup name="StorefrontVerifyCategoryContentActionGroup">
1112
<annotations>
1213
<description>Verify category content on storefront including image, description, meta title, and product count</description>
1314
</annotations>
1415
<arguments>
15-
<argument name="description" type="string"/>
16-
<argument name="metaTitle" type="string"/>
17-
<argument name="productCount" type="string"/>
16+
<argument name="description" type="string" defaultValue="categoryDescription"/>
17+
<argument name="metaTitle" type="string" defaultValue="metaTitle"/>
18+
<argument name="productCount" type="string" defaultValue="1"/>
1819
</arguments>
1920
<waitForElementVisible selector="{{StorefrontCategoryMainSection.categoryImage}}"
2021
stepKey="verifyImageVisible"/>

app/code/Magento/Catalog/Test/Mftf/Data/CategoryDisplaySettingsData.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* All Rights Reserved.
66
*/
77
-->
8+
89
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
910
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
1011
<entity name="CategoryDisplaySettings" type="category">

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* All Rights Reserved.
66
*/
77
-->
8+
89
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
910
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
1011
<test name="AdminMoveAndUpdateCategoryOnIndexerUpdateOnScheduleModeTest">
@@ -91,25 +92,32 @@
9192
<magentoCron groups="index" stepKey="runSecondCronAfterCategorySetup"/>
9293
</before>
9394
<after>
95+
<!-- Reset indexer modes back to realtime for other tests -->
9496
<magentoCLI command="indexer:set-mode realtime catalog_category_flat"
9597
stepKey="resetCategoryFlatIndexerToRealtimeMode"/>
9698
<magentoCLI command="indexer:set-mode realtime catalog_category_product"
9799
stepKey="resetCategoryProductsIndexerToRealtimeMode"/>
98100
<magentoCLI command="indexer:set-mode realtime catalog_product_category"
99101
stepKey="resetProductCategoriesIndexerToRealtimeMode"/>
102+
<!-- Reset flat catalog configuration back to default (disabled) -->
100103
<magentoCLI command="config:set catalog/frontend/flat_catalog_category 0"
101104
stepKey="disableCategoryFlatDataConfig"/>
105+
<!-- Clean up test products in reverse order of creation -->
102106
<deleteData createDataKey="createProductAA" stepKey="deleteProductAAFromCategoryA"/>
103107
<deleteData createDataKey="createProductBB" stepKey="deleteProductBBFromCategoryB"/>
104108
<deleteData createDataKey="createProductCC" stepKey="deleteProductCCFromCategoryC"/>
109+
<!-- Clean up test categories in reverse order of creation -->
105110
<deleteData createDataKey="createAnchorCategoryA" stepKey="deleteAnchorCategoryA"/>
106111
<deleteData createDataKey="createSubCategoryB" stepKey="deleteSubCategoryB"/>
107112
<deleteData createDataKey="createNonAnchorCategoryC" stepKey="deleteNonAnchorCategoryC"/>
113+
<!-- Clean up custom store and store view created for multi-store testing -->
108114
<actionGroup ref="DeleteCustomStoreActionGroup" stepKey="deleteCustomStoreGroup">
109115
<argument name="storeGroupName" value="customStore.name"/>
110116
</actionGroup>
117+
<!-- Final cleanup: flush cache and reindex to ensure clean state -->
111118
<magentoCLI command="cache:flush" stepKey="flushCacheAfterCleanup"/>
112119
<magentoCLI command="indexer:reindex" stepKey="reindexAfterCleanup"/>
120+
<!-- Logout from admin panel to clean up session -->
113121
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdminPanel"/>
114122
</after>
115123
<!-- Step 1:- Open Category A on Storefront -->
@@ -142,9 +150,7 @@
142150
stepKey="verifySuccessMessageForFirstCategoryMove"/>
143151
<actionGroup ref="AdminOpenIndexManagementPageActionGroup"
144152
stepKey="navigateToIndexManagementPageAfterFirstMove"/>
145-
<see userInput="Ready"
146-
selector="{{AdminIndexManagementSection.indexerStatus('Category Flat Data')}}"
147-
stepKey="verifyCategoryFlatIndexerReadyAfterFirstMove"/>
153+
<waitForElement selector="//tr[descendant::td[contains(., 'Category Flat Data')]]//*[contains(@class, 'col-indexer_status')]//span[@class='grid-severity-notice']//span" stepKey="verifyCategoryFlatIndexerReadyAfterFirstMove"/>
148154
<!-- Step 5:- Open Category A on Storefront and verify it hasn't moved yet -->
149155
<actionGroup ref="StorefrontGoToCategoryPageActionGroup"
150156
stepKey="navigateToStorefrontCategoryAAfterFirstMove">
@@ -243,9 +249,7 @@
243249
<!-- Step 16:- Open Admin > System > Index Management -->
244250
<actionGroup ref="AdminOpenIndexManagementPageActionGroup"
245251
stepKey="navigateToIndexManagementPageAfterStoreCreation"/>
246-
<see userInput="Ready"
247-
selector="{{AdminIndexManagementSection.indexerStatus('Category Flat Data')}}"
248-
stepKey="verifyCategoryFlatIndexerReadyAfterStoreCreation"/>
252+
<waitForElement selector="//tr[descendant::td[contains(., 'Category Flat Data')]]//*[contains(@class, 'col-indexer_status')]//span[@class='grid-severity-notice']//span" stepKey="verifyCategoryFlatIndexerReadyAfterStoreCreation"/>
249253
<!-- Step 17:- Open Admin > Catalog > Categories > Category A, switch to Store View 2, and update category settings -->
250254
<actionGroup ref="GoToAdminCategoryPageByIdActionGroup" stepKey="navigateToAdminCategoryAForStoreViewUpdate">
251255
<argument name="id" value="$createAnchorCategoryA.id$"/>

0 commit comments

Comments
 (0)