Skip to content

MFTF: Extract Action Groups to separate files - magento/module-indexer #25820

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

Merged
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 @@ -29,7 +29,7 @@
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
<deleteData createDataKey="categoryFirst" stepKey="deleteCategory"/>
<actionGroup ref="ResetSearchEngineConfiguration" stepKey="resetCatalogSearchConfiguration"/>
<actionGroup ref="updateIndexerOnSave" stepKey="resetIndexerBackToOriginalState">
<actionGroup ref="UpdateIndexerOnSaveActionGroup" stepKey="resetIndexerBackToOriginalState">
<argument name="indexerName" value="catalogsearch_fulltext"/>
</actionGroup>
<actionGroup ref="logout" stepKey="logoutOfAdmin"/>
Expand All @@ -39,7 +39,7 @@
<comment userInput="Change Catalog search engine option to Elastic Search 5.0+" stepKey="chooseElasticSearch5"/>
<actionGroup ref="ChooseElasticSearchAsSearchEngine" stepKey="chooseES5"/>
<actionGroup ref="ClearPageCacheActionGroup" stepKey="clearing"/>
<actionGroup ref="updateIndexerBySchedule" stepKey="updateAnIndexerBySchedule">
<actionGroup ref="UpdateIndexerByScheduleActionGroup" stepKey="updateAnIndexerBySchedule">
<argument name="indexerName" value="catalogsearch_fulltext"/>
</actionGroup>
<actionGroup ref="logout" stepKey="logoutOfAdmin"/>
Expand All @@ -57,4 +57,4 @@
<comment userInput="End of searching products" stepKey="endOfSearchingProducts"/>
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin2"/>
</test>
</tests>
</tests>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="updateIndexerBySchedule">
<actionGroup name="UpdateIndexerByScheduleActionGroup">
<annotations>
<description>Goes to the Index Management page. Checks the provided Indexer Name. Selects 'Update by Schedule'. Clicks on Submit.</description>
</annotations>
Expand All @@ -24,21 +24,4 @@
<!-- No re-indexing is done as part of this actionGroup since the test required no re-indexing -->
<waitForPageLoad stepKey="waitForSave"/>
</actionGroup>

<actionGroup name="updateIndexerOnSave">
<annotations>
<description>Goes to the Index Management page. Checks the provided Indexer Name. Selects 'Update on Save'. Clicks on Submit.</description>
</annotations>
<arguments>
<argument name="indexerName" type="string"/>
</arguments>

<amOnPage url="{{_ENV.MAGENTO_BACKEND_NAME}}/indexer/indexer/list/" stepKey="amOnIndexManagementPage2"/>
<waitForPageLoad stepKey="waitForIndexManagementPageToLoad2"/>
<click selector="{{AdminIndexManagementSection.indexerCheckbox(indexerName)}}" stepKey="selectIndexer2"/>
<selectOption selector="{{AdminIndexManagementSection.massActionSelect}}" userInput="change_mode_onthefly" stepKey="selectUpdateOnSave"/>
<click selector="{{AdminIndexManagementSection.massActionSubmit}}" stepKey="submitIndexerForm2"/>
<!-- No re-indexing is done as part of this actionGroup since the test required no re-indexing -->
<waitForPageLoad stepKey="waitForSave2"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="UpdateIndexerOnSaveActionGroup">
<annotations>
<description>Goes to the Index Management page. Checks the provided Indexer Name. Selects 'Update on Save'. Clicks on Submit.</description>
</annotations>
<arguments>
<argument name="indexerName" type="string"/>
</arguments>

<amOnPage url="{{_ENV.MAGENTO_BACKEND_NAME}}/indexer/indexer/list/" stepKey="amOnIndexManagementPage2"/>
<waitForPageLoad stepKey="waitForIndexManagementPageToLoad2"/>
<click selector="{{AdminIndexManagementSection.indexerCheckbox(indexerName)}}" stepKey="selectIndexer2"/>
<selectOption selector="{{AdminIndexManagementSection.massActionSelect}}" userInput="change_mode_onthefly" stepKey="selectUpdateOnSave"/>
<click selector="{{AdminIndexManagementSection.massActionSubmit}}" stepKey="submitIndexerForm2"/>
<!-- No re-indexing is done as part of this actionGroup since the test required no re-indexing -->
<waitForPageLoad stepKey="waitForSave2"/>
</actionGroup>
</actionGroups>