Skip to content

Commit b6ca24a

Browse files
authored
ENGCOM-6837: Fix failure for missing product on Storefront #26779
2 parents 9f093a3 + a016fcf commit b6ca24a

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<argument name="category" value="$$createPreReqCategory$$"/>
3131
<argument name="simpleProduct" value="_defaultProduct"/>
3232
</actionGroup>
33+
<magentoCLI stepKey="runCronIndex" command="cron:run --group=index"/>
3334
<actionGroup ref="AssertProductInStorefrontCategoryPage" stepKey="assertProductInStorefront1">
3435
<argument name="category" value="$$createPreReqCategory$$"/>
3536
<argument name="product" value="_defaultProduct"/>

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@
5555
<argument name="categoryName" value="$$categoryN.name$$, $$categoryM.name$$"/>
5656
</actionGroup>
5757

58-
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
59-
<magentoCLI command="cache:flush" arguments="full_page" stepKey="flushCache"/>
58+
<wait stepKey="waitBeforeRunCronIndex" time="30"/>
59+
<magentoCLI stepKey="runCronIndex" command="cron:run --group=index"/>
6060
</before>
6161
<after>
6262
<!-- Change "Category Products" and "Product Categories" indexers to "Update on Save" mode -->
@@ -138,9 +138,9 @@
138138
<amOnPage url="{{StorefrontCategoryPage.url($$categoryK.custom_attributes[url_key]$$/$$categoryN.custom_attributes[url_key]$$)}}" stepKey="amOnCategoryN"/>
139139
<see userInput="$$productC.name$$" selector="{{StorefrontCategoryMainSection.productName}}" stepKey="seeProductInCategoryN"/>
140140

141-
<!-- Run cron twice -->
142-
<magentoCLI command="cron:run" stepKey="runCron"/>
143-
<magentoCLI command="cron:run" stepKey="runCronAgain"/>
141+
<!-- Run cron -->
142+
<wait stepKey="waitBeforeRunMagentoCron" time="30"/>
143+
<magentoCLI stepKey="runMagentoCron" command="cron:run --group=index"/>
144144

145145
<!-- Open categories K, L, M, N on Storefront in order to make sure that new assigments are applied -->
146146
<!-- Category K contains only Products A, C -->
@@ -199,9 +199,9 @@
199199
<amOnPage url="{{StorefrontCategoryPage.url($$categoryK.custom_attributes[url_key]$$/$$categoryN.custom_attributes[url_key]$$)}}" stepKey="onStorefrontCategoryN"/>
200200
<see userInput="$$productC.name$$" selector="{{StorefrontCategoryMainSection.productName}}" stepKey="productCOnCategoryN"/>
201201

202-
<!-- Run cron twice -->
203-
<magentoCLI command="cron:run" stepKey="firstCronRun"/>
204-
<magentoCLI command="cron:run" stepKey="secondCronRun"/>
202+
<!-- Run Cron once to reindex product changes -->
203+
<wait stepKey="waitBeforeRunCronIndexAfterProductAssignToCategory" time="30"/>
204+
<magentoCLI stepKey="runCronIndexAfterProductAssignToCategory" command="cron:run --group=index"/>
205205

206206
<!-- Open categories K, L, M, N on Storefront in order to make sure that new assigments are applied -->
207207

0 commit comments

Comments
 (0)