Skip to content

Commit 9480de1

Browse files
authored
ENGCOM-7472: MFTF: Add <magentoCron instruction - CatalogImportExport / CatalogInventory / CatalogRule #27323
2 parents 155d273 + edb681a commit 9480de1

18 files changed

+25
-88
lines changed

app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportBundleProductTest.xml

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -80,15 +80,10 @@
8080
<requiredEntity createDataKey="secondSimpleProductForFixedWithAttribute"/>
8181
</createData>
8282

83-
<!-- Run cron twice -->
84-
<magentoCLI command="cron:run" stepKey="runCron1"/>
85-
<magentoCLI command="cron:run" stepKey="runCron2"/>
86-
87-
<!-- Login as admin -->
83+
<magentoCron stepKey="runCron"/>
8884
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
8985
</before>
9086
<after>
91-
<!-- Delete products creations -->
9287
<deleteData createDataKey="createDynamicBundleProduct" stepKey="deleteDynamicBundleProduct"/>
9388
<deleteData createDataKey="firstSimpleProductForDynamic" stepKey="deleteFirstSimpleProductForDynamic"/>
9489
<deleteData createDataKey="secondSimpleProductForDynamic" stepKey="deleteSecondSimpleProductForDynamic"/>
@@ -100,10 +95,7 @@
10095
<deleteData createDataKey="secondSimpleProductForFixedWithAttribute" stepKey="deleteSecondSimpleProductForFixedWithAttribute"/>
10196
<deleteData createDataKey="createProductAttribute" stepKey="deleteProductAttribute"/>
10297

103-
<!-- Log out -->
10498
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
105-
106-
<!-- Reindex invalidated indices after product attribute has been created/deleted -->
10799
<magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
108100
</after>
109101

@@ -113,10 +105,6 @@
113105
<!-- Export created below products -->
114106
<actionGroup ref="ExportAllProductsActionGroup" stepKey="exportCreatedProducts"/>
115107

116-
<!-- Run cron -->
117-
<magentoCLI command="cron:run" stepKey="runCron3"/>
118-
<magentoCLI command="cron:run" stepKey="runCron4"/>
119-
120108
<grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
121109

122110
<!-- Download product -->

app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportGroupedProductWithSpecialPriceTest.xml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,13 @@
4848
<requiredEntity createDataKey="createSecondSimpleProduct"/>
4949
</updateData>
5050

51-
<!-- Run cron twice -->
52-
<magentoCLI command="cron:run" stepKey="runCron1"/>
53-
<magentoCLI command="cron:run" stepKey="runCron2"/>
54-
55-
<!-- Login as admin -->
51+
<magentoCron stepKey="runCron"/>
5652
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
5753
</before>
5854
<after>
59-
<!-- Deleted created products -->
6055
<deleteData createDataKey="createFirstSimpleProduct" stepKey="deleteFirstSimpleProduct"/>
6156
<deleteData createDataKey="createSecondSimpleProduct" stepKey="deleteSecondSimpleProduct"/>
6257
<deleteData createDataKey="createGroupedProduct" stepKey="deleteGroupedProduct"/>
63-
64-
<!-- Delete category -->
6558
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
6659

6760
<!-- Log out -->
@@ -75,9 +68,7 @@
7568
<!-- Export created below products -->
7669
<actionGroup ref="ExportAllProductsActionGroup" stepKey="exportCreatedProducts"/>
7770

78-
<!-- Run cron -->
79-
<magentoCLI command="cron:run" stepKey="runCron3"/>
80-
<magentoCLI command="cron:run" stepKey="runCron4"/>
71+
<magentoCron stepKey="runCronIndex" groups="index"/>
8172

8273
<grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
8374

app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportImportConfigurableProductWithImagesTest.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,8 @@
126126
<requiredEntity createDataKey="createConfigChildProduct"/>
127127
</createData>
128128

129-
<!-- Login as admin -->
129+
<magentoCron stepKey="runCronIndex" groups="index"/>
130+
130131
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
131132
</before>
132133
<after>
@@ -151,8 +152,6 @@
151152
<actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetProductGridColumnsInitial"/>
152153
<!-- Admin logout-->
153154
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>
154-
155-
<!-- Reindex invalidated indices after product attribute has been created/deleted -->
156155
<magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
157156
</after>
158157

app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleAndConfigurableProductsWithCustomOptionsTest.xml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,7 @@
7373
<requiredEntity createDataKey="createConfigSecondChildProduct"/>
7474
</createData>
7575

76-
<!-- Run cron twice -->
77-
<magentoCLI command="cron:run" stepKey="runCron1"/>
78-
<magentoCLI command="cron:run" stepKey="runCron2"/>
79-
80-
<!-- Login as admin -->
76+
<magentoCron stepKey="runCronIndex" groups="index"/>
8177
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
8278
</before>
8379
<after>
@@ -88,10 +84,7 @@
8884
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
8985
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
9086

91-
<!-- Log out -->
9287
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
93-
94-
<!-- Reindex invalidated indices after product attribute has been created/deleted -->
9588
<magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
9689
</after>
9790

@@ -105,9 +98,7 @@
10598
<argument name="attributeData" value="$$createConfigProduct.sku$$"/>
10699
</actionGroup>
107100

108-
<!-- Run cron -->
109-
<magentoCLI command="cron:run" stepKey="runCron3"/>
110-
<magentoCLI command="cron:run" stepKey="runCron4"/>
101+
<magentoCron stepKey="runCron"/>
111102

112103
<grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
113104

app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAndConfigurableProductsWithAssignedImagesTest.xml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,7 @@
8989
<requiredEntity createDataKey="createConfigProduct"/>
9090
</createData>
9191

92-
<!-- Run cron twice -->
93-
<magentoCLI command="cron:run" stepKey="runCron1"/>
94-
<magentoCLI command="cron:run" stepKey="runCron2"/>
95-
96-
<!-- Login as admin -->
92+
<magentoCron stepKey="runCronIndex" groups="index"/>
9793
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
9894
</before>
9995
<after>
@@ -104,10 +100,7 @@
104100
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
105101
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
106102

107-
<!-- Log out -->
108103
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
109-
110-
<!-- Reindex invalidated indices after product attribute has been created/deleted -->
111104
<magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
112105
</after>
113106

@@ -120,9 +113,7 @@
120113
<argument name="attributeData" value="$$createConfigProduct.sku$$"/>
121114
</actionGroup>
122115

123-
<!-- Run cron -->
124-
<magentoCLI command="cron:run" stepKey="runCron3"/>
125-
<magentoCLI command="cron:run" stepKey="runCron4"/>
116+
<magentoCron stepKey="runCron"/>
126117

127118
<grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
128119

app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductAssignedToMainWebsiteAndConfigurableProductAssignedToCustomWebsiteTest.xml

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,7 @@
7171
<requiredEntity createDataKey="createConfigSecondChildProduct"/>
7272
</createData>
7373

74-
<!-- Run cron twice -->
75-
<magentoCLI command="cron:run" stepKey="runCron1"/>
76-
<magentoCLI command="cron:run" stepKey="runCron2"/>
77-
78-
<!-- Login as admin -->
74+
<magentoCron stepKey="runCronIndex" groups="index"/>
7975
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
8076
</before>
8177
<after>
@@ -90,10 +86,7 @@
9086
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
9187
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
9288

93-
<!-- Log out -->
9489
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
95-
96-
<!-- Reindex invalidated indices after product attribute has been created/deleted -->
9790
<magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
9891
</after>
9992

@@ -104,9 +97,7 @@
10497
<!-- Export created below products -->
10598
<actionGroup ref="ExportAllProductsActionGroup" stepKey="exportCreatedProducts"/>
10699

107-
<!-- Run cron -->
108-
<magentoCLI command="cron:run" stepKey="runCron3"/>
109-
<magentoCLI command="cron:run" stepKey="runCron4"/>
100+
<magentoCron stepKey="runCron"/>
110101

111102
<grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
112103

app/code/Magento/CatalogImportExport/Test/Mftf/Test/AdminExportSimpleProductWithCustomAttributeTest.xml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,7 @@
2828
<requiredEntity createDataKey="createAttributeSet"/>
2929
</createData>
3030

31-
<!-- Run cron twice -->
32-
<magentoCLI command="cron:run" stepKey="runCron1"/>
33-
<magentoCLI command="cron:run" stepKey="runCron2"/>
34-
35-
<!-- Login as admin -->
31+
<magentoCron stepKey="runCron"/>
3632
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
3733
</before>
3834
<after>
@@ -52,9 +48,7 @@
5248
<!-- Export created below products -->
5349
<actionGroup ref="ExportAllProductsActionGroup" stepKey="exportCreatedProducts"/>
5450

55-
<!-- Run cron -->
56-
<magentoCLI command="cron:run" stepKey="runCron3"/>
57-
<magentoCLI command="cron:run" stepKey="runCron4"/>
51+
<magentoCron stepKey="runCronIndex" groups="index"/>
5852

5953
<grabTextFrom selector="{{AdminExportAttributeSection.exportFileNameByPosition('0')}}" stepKey="grabNameFile"/>
6054

app/code/Magento/CatalogInventory/Test/Mftf/Test/AdminCreateProductWithZeroMaximumQtyAllowedInShoppingCartTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
<before>
2424
<createData entity="DefaultValueForMaxSaleQty" stepKey="setDefaultValueForMaxSaleQty"/>
2525
<createData entity="SimpleProduct2" stepKey="createdProduct"/>
26+
<magentoCron stepKey="runCronIndex" groups="index"/>
2627
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
2728
</before>
2829
<after>

app/code/Magento/CatalogInventory/Test/Mftf/Test/AssociatedProductToConfigurableOutOfStockTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
<createData entity="Simple_US_Customer" stepKey="createSimpleUsCustomer">
7878
<field key="group_id">1</field>
7979
</createData>
80+
<magentoCron stepKey="runCronIndex" groups="index"/>
8081
</before>
8182

8283
<after>

app/code/Magento/CatalogRule/Test/Mftf/Test/AdminApplyCatalogRuleByCategoryTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<createData entity="ApiSimpleProduct" stepKey="createSimpleProductTwo">
2727
<requiredEntity createDataKey="createCategoryTwo"/>
2828
</createData>
29-
29+
<magentoCron stepKey="runCronIndex" groups="index"/>
3030
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
3131
</before>
3232
<after>

0 commit comments

Comments
 (0)