|
55 | 55 | <argument name="categoryName" value="$$categoryN.name$$, $$categoryM.name$$"/> |
56 | 56 | </actionGroup> |
57 | 57 |
|
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"/> |
60 | 60 | </before> |
61 | 61 | <after> |
62 | 62 | <!-- Change "Category Products" and "Product Categories" indexers to "Update on Save" mode --> |
|
138 | 138 | <amOnPage url="{{StorefrontCategoryPage.url($$categoryK.custom_attributes[url_key]$$/$$categoryN.custom_attributes[url_key]$$)}}" stepKey="amOnCategoryN"/> |
139 | 139 | <see userInput="$$productC.name$$" selector="{{StorefrontCategoryMainSection.productName}}" stepKey="seeProductInCategoryN"/> |
140 | 140 |
|
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"/> |
144 | 144 |
|
145 | 145 | <!-- Open categories K, L, M, N on Storefront in order to make sure that new assigments are applied --> |
146 | 146 | <!-- Category K contains only Products A, C --> |
|
199 | 199 | <amOnPage url="{{StorefrontCategoryPage.url($$categoryK.custom_attributes[url_key]$$/$$categoryN.custom_attributes[url_key]$$)}}" stepKey="onStorefrontCategoryN"/> |
200 | 200 | <see userInput="$$productC.name$$" selector="{{StorefrontCategoryMainSection.productName}}" stepKey="productCOnCategoryN"/> |
201 | 201 |
|
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"/> |
205 | 205 |
|
206 | 206 | <!-- Open categories K, L, M, N on Storefront in order to make sure that new assigments are applied --> |
207 | 207 |
|
|
0 commit comments