Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MFTF: Add <magentoCron instruction - CatalogImportExport / CatalogInventory / CatalogRule #27323

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,10 @@
<requiredEntity createDataKey="secondSimpleProductForFixedWithAttribute"/>
</createData>

<!-- Run cron twice -->
<magentoCLI command="cron:run" stepKey="runCron1"/>
<magentoCLI command="cron:run" stepKey="runCron2"/>

<!-- Login as admin -->
<magentoCron stepKey="runCron"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
</before>
<after>
<!-- Delete products creations -->
<deleteData createDataKey="createDynamicBundleProduct" stepKey="deleteDynamicBundleProduct"/>
<deleteData createDataKey="firstSimpleProductForDynamic" stepKey="deleteFirstSimpleProductForDynamic"/>
<deleteData createDataKey="secondSimpleProductForDynamic" stepKey="deleteSecondSimpleProductForDynamic"/>
Expand All @@ -100,10 +95,7 @@
<deleteData createDataKey="secondSimpleProductForFixedWithAttribute" stepKey="deleteSecondSimpleProductForFixedWithAttribute"/>
<deleteData createDataKey="createProductAttribute" stepKey="deleteProductAttribute"/>

<!-- Log out -->
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>

<!-- Reindex invalidated indices after product attribute has been created/deleted -->
<magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
</after>

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

<!-- Run cron -->
<magentoCLI command="cron:run" stepKey="runCron3"/>
<magentoCLI command="cron:run" stepKey="runCron4"/>

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

<!-- Download product -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,13 @@
<requiredEntity createDataKey="createSecondSimpleProduct"/>
</updateData>

<!-- Run cron twice -->
<magentoCLI command="cron:run" stepKey="runCron1"/>
<magentoCLI command="cron:run" stepKey="runCron2"/>

<!-- Login as admin -->
<magentoCron stepKey="runCron"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
</before>
<after>
<!-- Deleted created products -->
<deleteData createDataKey="createFirstSimpleProduct" stepKey="deleteFirstSimpleProduct"/>
<deleteData createDataKey="createSecondSimpleProduct" stepKey="deleteSecondSimpleProduct"/>
<deleteData createDataKey="createGroupedProduct" stepKey="deleteGroupedProduct"/>

<!-- Delete category -->
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>

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

<!-- Run cron -->
<magentoCLI command="cron:run" stepKey="runCron3"/>
<magentoCLI command="cron:run" stepKey="runCron4"/>
<magentoCron stepKey="runCronIndex" groups="index"/>

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@
<requiredEntity createDataKey="createConfigChildProduct"/>
</createData>

<!-- Login as admin -->
<magentoCron stepKey="runCronIndex" groups="index"/>

<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
</before>
<after>
Expand All @@ -151,8 +152,6 @@
<actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="resetProductGridColumnsInitial"/>
<!-- Admin logout-->
<actionGroup ref="AdminLogoutActionGroup" stepKey="adminLogout"/>

<!-- Reindex invalidated indices after product attribute has been created/deleted -->
<magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
</after>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,7 @@
<requiredEntity createDataKey="createConfigSecondChildProduct"/>
</createData>

<!-- Run cron twice -->
<magentoCLI command="cron:run" stepKey="runCron1"/>
<magentoCLI command="cron:run" stepKey="runCron2"/>

<!-- Login as admin -->
<magentoCron stepKey="runCronIndex" groups="index"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
</before>
<after>
Expand All @@ -88,10 +84,7 @@
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>

<!-- Log out -->
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>

<!-- Reindex invalidated indices after product attribute has been created/deleted -->
<magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
</after>

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

<!-- Run cron -->
<magentoCLI command="cron:run" stepKey="runCron3"/>
<magentoCLI command="cron:run" stepKey="runCron4"/>
<magentoCron stepKey="runCron"/>

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,7 @@
<requiredEntity createDataKey="createConfigProduct"/>
</createData>

<!-- Run cron twice -->
<magentoCLI command="cron:run" stepKey="runCron1"/>
<magentoCLI command="cron:run" stepKey="runCron2"/>

<!-- Login as admin -->
<magentoCron stepKey="runCronIndex" groups="index"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
</before>
<after>
Expand All @@ -104,10 +100,7 @@
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>

<!-- Log out -->
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>

<!-- Reindex invalidated indices after product attribute has been created/deleted -->
<magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
</after>

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

<!-- Run cron -->
<magentoCLI command="cron:run" stepKey="runCron3"/>
<magentoCLI command="cron:run" stepKey="runCron4"/>
<magentoCron stepKey="runCron"/>

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,7 @@
<requiredEntity createDataKey="createConfigSecondChildProduct"/>
</createData>

<!-- Run cron twice -->
<magentoCLI command="cron:run" stepKey="runCron1"/>
<magentoCLI command="cron:run" stepKey="runCron2"/>

<!-- Login as admin -->
<magentoCron stepKey="runCronIndex" groups="index"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
</before>
<after>
Expand All @@ -90,10 +86,7 @@
<deleteData createDataKey="createConfigProductAttribute" stepKey="deleteConfigProductAttribute"/>
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>

<!-- Log out -->
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>

<!-- Reindex invalidated indices after product attribute has been created/deleted -->
<magentoCron groups="index" stepKey="reindexInvalidatedIndices"/>
</after>

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

<!-- Run cron -->
<magentoCLI command="cron:run" stepKey="runCron3"/>
<magentoCLI command="cron:run" stepKey="runCron4"/>
<magentoCron stepKey="runCron"/>

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@
<requiredEntity createDataKey="createAttributeSet"/>
</createData>

<!-- Run cron twice -->
<magentoCLI command="cron:run" stepKey="runCron1"/>
<magentoCLI command="cron:run" stepKey="runCron2"/>

<!-- Login as admin -->
<magentoCron stepKey="runCron"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
</before>
<after>
Expand All @@ -52,9 +48,7 @@
<!-- Export created below products -->
<actionGroup ref="ExportAllProductsActionGroup" stepKey="exportCreatedProducts"/>

<!-- Run cron -->
<magentoCLI command="cron:run" stepKey="runCron3"/>
<magentoCLI command="cron:run" stepKey="runCron4"/>
<magentoCron stepKey="runCronIndex" groups="index"/>

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<before>
<createData entity="DefaultValueForMaxSaleQty" stepKey="setDefaultValueForMaxSaleQty"/>
<createData entity="SimpleProduct2" stepKey="createdProduct"/>
<magentoCron stepKey="runCronIndex" groups="index"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="login"/>
</before>
<after>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
<createData entity="Simple_US_Customer" stepKey="createSimpleUsCustomer">
<field key="group_id">1</field>
</createData>
<magentoCron stepKey="runCronIndex" groups="index"/>
</before>

<after>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<createData entity="ApiSimpleProduct" stepKey="createSimpleProductTwo">
<requiredEntity createDataKey="createCategoryTwo"/>
</createData>

<magentoCron stepKey="runCronIndex" groups="index"/>
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
</before>
<after>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
<requiredEntity createDataKey="createConfigProduct"/>
<requiredEntity createDataKey="createSecondConfigChildProduct"/>
</createData>
<magentoCron stepKey="runCronIndex" groups="index"/>
</before>
<after>
<!-- Delete the catalog price rule -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@
<group value="CatalogRule"/>
</annotations>
<before>
<!-- Create a category -->
<createData entity="ApiCategory" stepKey="createCategory"/>
<!-- Create a simple product -->
<createData entity="ApiSimpleProduct" stepKey="createSimpleProduct">
<requiredEntity createDataKey="createCategory"/>
</createData>
<magentoCron stepKey="runCronIndex" groups="index"/>
<!-- Login to Admin page -->
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<!-- Create a configurable product -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<createData entity="productDropDownAttribute" stepKey="createSecondProductAttribute">
<field key="scope">website</field>
</createData>
<magentoCron stepKey="runCronIndex" groups="index"/>
</before>
<after>

Expand All @@ -63,8 +64,7 @@
<deleteData createDataKey="createSecondProductAttribute" stepKey="deleteSecondProductAttribute"/>

<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
<magentoCLI command="indexer:reindex" stepKey="reindex"/>
<magentoCLI command="cache:flush" stepKey="flushCache"/>
<magentoCron stepKey="runCronIndex" groups="index"/>
</after>

<!--Create catalog price rule-->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
<requiredEntity createDataKey="createConfigProduct"/>
<requiredEntity createDataKey="createConfigChildProduct2"/>
</createData>

<magentoCron stepKey="runCronIndex" groups="index"/>
</before>
<after>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
<requiredEntity createDataKey="createConfigProduct"/>
<requiredEntity createDataKey="createConfigChildProduct2"/>
</createData>
<magentoCron stepKey="runCronIndex" groups="index"/>
</before>
<after>
<!-- Delete the catalog price rule -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

<!-- Update all products to have custom options -->
<updateData createDataKey="createProduct1" entity="productWithFixedOptions" stepKey="updateProductWithOptions1"/>
<magentoCron stepKey="runCronIndex" groups="index"/>
</before>
<after>
<!-- Delete products and category -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,15 @@

<!-- Create new customer group -->
<createData entity="CustomCustomerGroup" stepKey="customerGroup" />

<!--Creating customer-->
<createData entity="Simple_US_Customer" stepKey="createCustomer" >
<field key="group_id">$customerGroup.id$</field>
</createData>

<!-- Create category -->
<createData entity="_defaultCategory" stepKey="createCategory"/>

<!-- Create Simple Product -->
<createData entity="_defaultProduct" stepKey="createSimpleProduct">
<requiredEntity createDataKey="createCategory"/>
<field key="price">56.78</field>
</createData>
<magentoCron stepKey="runCronIndex" groups="index"/>
</before>
<after>
<!-- Delete products and category -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,15 @@
<before>
<!-- Login as Admin -->
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>

<!-- Create category -->
<createData entity="_defaultCategory" stepKey="createCategory"/>

<!-- Create Simple Product 1 -->
<createData entity="_defaultProduct" stepKey="createProduct1">
<requiredEntity createDataKey="createCategory"/>
<field key="price">56.78</field>
</createData>

<!-- Create Simple Product 2 -->
<createData entity="_defaultProduct" stepKey="createProduct2">
<requiredEntity createDataKey="createCategory"/>
<field key="price">56.78</field>
</createData>

<!-- Create Simple Product 3 -->
<createData entity="_defaultProduct" stepKey="createProduct3">
<requiredEntity createDataKey="createCategory"/>
<field key="price">56.78</field>
Expand All @@ -47,6 +39,7 @@
<updateData createDataKey="createProduct1" entity="productWithCustomOptions" stepKey="updateProductWithOptions1"/>
<updateData createDataKey="createProduct2" entity="productWithCustomOptions" stepKey="updateProductWithOptions2"/>
<updateData createDataKey="createProduct3" entity="productWithCustomOptions" stepKey="updateProductWithOptions3"/>
<magentoCron stepKey="runCronIndex" groups="index"/>
</before>
<after>
<!-- Delete products and category -->
Expand Down