Skip to content

Commit fc53e16

Browse files
authored
ENGCOM-6564: MFTF: Extract Action Groups to separate files - magento/module-ui #26323
2 parents 8bed303 + e1e0567 commit fc53e16

9 files changed

+56
-16
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<waitForPageLoad stepKey="waitForSimpleProductPageLoad"/>
3939
<!--Save and duplicated the product once-->
4040
<comment userInput="Save and duplicated the product once" stepKey="commentSaveAndDuplicateProduct"/>
41-
<actionGroup ref="AdminFormSaveAndDuplicate" stepKey="saveAndDuplicateProductFormFirstTime"/>
41+
<actionGroup ref="AdminFormSaveAndDuplicateActionGroup" stepKey="saveAndDuplicateProductFormFirstTime"/>
4242
<conditionalClick selector="{{AdminProductSEOSection.sectionHeader}}" dependentSelector="{{AdminProductSEOSection.urlKeyInput}}" visible="false" stepKey="openSEOSection"/>
4343
<grabValueFrom selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="grabDuplicatedProductUrlKey"/>
4444
<assertContains expected="$$createSimpleProduct.custom_attributes[url_key]$$" actual="$grabDuplicatedProductUrlKey" stepKey="assertDuplicatedProductUrlKey"/>
@@ -65,7 +65,7 @@
6565
<comment userInput="Save and duplicated the product second time" stepKey="commentSaveAndDuplicateProduct1"/>
6666
<amOnPage url="{{AdminProductEditPage.url($$createSimpleProduct.id$$)}}" stepKey="goToProductEditPage1"/>
6767
<waitForPageLoad stepKey="waitForSimpleProductPageLoad2"/>
68-
<actionGroup ref="AdminFormSaveAndDuplicate" stepKey="saveAndDuplicateProductFormSecondTime"/>
68+
<actionGroup ref="AdminFormSaveAndDuplicateActionGroup" stepKey="saveAndDuplicateProductFormSecondTime"/>
6969
<conditionalClick selector="{{AdminProductSEOSection.sectionHeader}}" dependentSelector="{{AdminProductSEOSection.urlKeyInput}}" visible="false" stepKey="openProductSEOSection"/>
7070
<waitForElementVisible selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="waitForUrlKeyField"/>
7171
<grabValueFrom selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="grabSecondDuplicatedProductUrlKey"/>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,14 +72,14 @@
7272
<argument name="product" value="$$createSimpleProduct$$"/>
7373
</actionGroup>
7474
<!--Save and duplicated the product once-->
75-
<actionGroup ref="AdminFormSaveAndDuplicate" stepKey="saveAndDuplicateProductForm1"/>
75+
<actionGroup ref="AdminFormSaveAndDuplicateActionGroup" stepKey="saveAndDuplicateProductForm1"/>
7676
<actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="searchForSimpleProduct2">
7777
<argument name="product" value="$$createSimpleProduct$$"/>
7878
</actionGroup>
7979
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct2">
8080
<argument name="product" value="$$createSimpleProduct$$"/>
8181
</actionGroup>
8282
<!--Save and duplicated the product second time-->
83-
<actionGroup ref="AdminFormSaveAndDuplicate" stepKey="saveAndDuplicateProductForm2"/>
83+
<actionGroup ref="AdminFormSaveAndDuplicateActionGroup" stepKey="saveAndDuplicateProductForm2"/>
8484
</test>
8585
</tests>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openEditProduct2">
6262
<argument name="product" value="$$product2$$"/>
6363
</actionGroup>
64-
<actionGroup ref="AdminFormSaveAndClose" stepKey="saveAndCloseProduct"/>
64+
<actionGroup ref="AdminFormSaveAndCloseActionGroup" stepKey="saveAndCloseProduct"/>
6565
<waitForPageLoad stepKey="waitForPageLoad1"/>
6666
<seeInField selector="{{AdminDataGridPaginationSection.currentPage}}" userInput="2" stepKey="seeOnSecondPageOrderGrid"/>
6767
</test>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<actionGroup ref="FilterProductGridBySetNewFromDateActionGroup" stepKey="filterProductGridToCheckSetAsNewColumn"/>
4949
<click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnFirstRowProductGrid"/>
5050
<waitForPageLoad stepKey="waitForProductEditPageToLoad"/>
51-
<actionGroup ref="AdminFormSaveAndClose" stepKey="saveAndCloseProductForm"/>
51+
<actionGroup ref="AdminFormSaveAndCloseActionGroup" stepKey="saveAndCloseProductForm"/>
5252
<click selector="{{AdminProductGridFilterSection.filters}}" stepKey="expandFilters"/>
5353
<seeInField selector="{{AdminProductGridFilterSection.newFromDateFilter}}" userInput="05/16/2018" stepKey="checkForNewFromDate"/>
5454
<click selector="{{AdminProductGridFilterSection.columnsDropdown}}" stepKey="openColumnsDropdown2"/>

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/ConfigurableProductPriceAdditionalStoreViewTest.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
<waitForElementVisible selector="{{AdminProductFormSection.enableProductLabel}}" stepKey="waitForProductEnableSlider"/>
141141
<click selector="{{AdminProductFormSection.enableProductLabel}}" stepKey="enableProductForSecondStoreView"/>
142142
<seeCheckboxIsChecked selector="{{AdminProductFormSection.productStatus}}" stepKey="seeThatProductIsEnabled"/>
143-
<actionGroup ref="AdminFormSaveAndClose" stepKey="enabledConfigProductSecondStore"/>
143+
<actionGroup ref="AdminFormSaveAndCloseActionGroup" stepKey="enabledConfigProductSecondStore"/>
144144

145145
<!--go to admin and open product edit page to enable child product for second store view -->
146146
<amOnPage url="{{AdminProductEditPage.url($$createConfigProduct.id$$)}}" stepKey="goToProductEditPage2"/>
@@ -154,7 +154,7 @@
154154
<click selector="{{AdminProductFormConfigurationsSection.enableProductBtn}}" stepKey="clickEnableChildProduct1"/>
155155
<click selector="{{AdminProductFormConfigurationsSection.actionsBtn('2')}}" stepKey="clickToExpandActionsForSecondVariation2"/>
156156
<click selector="{{AdminProductFormConfigurationsSection.enableProductBtn}}" stepKey="clickEnableChildProduct2"/>
157-
<actionGroup ref="AdminFormSaveAndClose" stepKey="saveAll"/>
157+
<actionGroup ref="AdminFormSaveAndCloseActionGroup" stepKey="saveAll"/>
158158

159159
<!-- assert second store view storefront category list page -->
160160
<amOnPage url="/second_store_view/" stepKey="amOnsecondStoreFront1"/>
@@ -168,7 +168,7 @@
168168
<waitForPageLoad stepKey="waitChild1EditPageToLoad"/>
169169
<click selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="openProduct1InWebsitesSection"/>
170170
<click selector="{{ProductInWebsitesSection.website('Second Website')}}" stepKey="selectSecondWebsite1"/>
171-
<actionGroup ref="AdminFormSaveAndClose" stepKey="saveUpdatedChild1Again"/>
171+
<actionGroup ref="AdminFormSaveAndCloseActionGroup" stepKey="saveUpdatedChild1Again"/>
172172

173173
<!--go to admin again and open child product1 and enable for second store view-->
174174
<amOnPage url="{{AdminProductEditPage.url($$createConfigChildProduct1.id$$)}}" stepKey="goToProduct1EditPage"/>
@@ -180,14 +180,14 @@
180180
<see userInput="Second Store View" selector="{{AdminMainActionsSection.storeSwitcher}}" stepKey="seeNewStoreViewNameP1"/>
181181
<waitForElementVisible selector="{{AdminProductFormSection.enableProductLabel}}" stepKey="waitForProductEnableSliderP1"/>
182182
<seeCheckboxIsChecked selector="{{AdminProductFormSection.productStatus}}" stepKey="seeThatProduct1IsEnabled"/>
183-
<actionGroup ref="AdminFormSaveAndClose" stepKey="save2UpdatedChild1"/>
183+
<actionGroup ref="AdminFormSaveAndCloseActionGroup" stepKey="save2UpdatedChild1"/>
184184

185185
<!--go to admin and open child product2 edit page and assign it to the second website -->
186186
<amOnPage url="{{AdminProductEditPage.url($$createConfigChildProduct2.id$$)}}" stepKey="goToProduct2EditPage"/>
187187
<waitForPageLoad stepKey="waitChild2EditPageToLoad"/>
188188
<click selector="{{ProductInWebsitesSection.sectionHeader}}" stepKey="openProduct2InWebsitesSection"/>
189189
<click selector="{{ProductInWebsitesSection.website('Second Website')}}" stepKey="selectSecondWebsite2"/>
190-
<actionGroup ref="AdminFormSaveAndClose" stepKey="saveUpdatedChild2"/>
190+
<actionGroup ref="AdminFormSaveAndCloseActionGroup" stepKey="saveUpdatedChild2"/>
191191

192192
<!--go to admin again and open child product2 and enable for second store view-->
193193
<amOnPage url="{{AdminProductEditPage.url($$createConfigChildProduct2.id$$)}}" stepKey="goToProduct2EditPage2"/>
@@ -199,7 +199,7 @@
199199
<see userInput="Second Store View" selector="{{AdminMainActionsSection.storeSwitcher}}" stepKey="seeNewStoreViewNameP2"/>
200200
<waitForElementVisible selector="{{AdminProductFormSection.enableProductLabel}}" stepKey="waitForProductEnableSliderP2"/>
201201
<seeCheckboxIsChecked selector="{{AdminProductFormSection.productStatus}}" stepKey="seeThatProduct2IsEnabled"/>
202-
<actionGroup ref="AdminFormSaveAndClose" stepKey="save2UpdatedChild2"/>
202+
<actionGroup ref="AdminFormSaveAndCloseActionGroup" stepKey="save2UpdatedChild2"/>
203203

204204
<!-- assert storefront category list page -->
205205
<amOnPage url="/second_store_view/" stepKey="amOnsecondStoreFront"/>

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontVisibilityOfDuplicateProductTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
<actionGroup ref="SaveProductFormActionGroup" stepKey="saveProduct"/>
115115
<!--Duplicate the product-->
116116
<comment userInput="Duplicate the product" stepKey="commentDuplicateProduct"/>
117-
<actionGroup ref="AdminFormSaveAndDuplicate" stepKey="saveAndDuplicateProductForm"/>
117+
<actionGroup ref="AdminFormSaveAndDuplicateActionGroup" stepKey="saveAndDuplicateProductForm"/>
118118
<click selector="{{AdminProductFormSection.enableProductLabel}}" stepKey="clickEnableProduct"/>
119119
<fillField selector="{{AdminProductFormSection.productName}}" userInput="$$createConfigProduct.name$$-Updated" stepKey="fillProductName"/>
120120
<selectOption selector="{{AdminProductFormSection.productStockStatus}}" userInput="1" stepKey="selectInStock"/>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminFormSaveAndCloseActionGroup">
12+
<annotations>
13+
<description>Clicks on 'Save and Close'. Validates that the Success Message is present.</description>
14+
</annotations>
15+
16+
<click selector="{{AdminProductFormActionSection.saveArrow}}" stepKey="openSaveDropDown"/>
17+
<click selector="{{AdminProductFormActionSection.saveAndClose}}" stepKey="clickOnSaveAndClose"/>
18+
<seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="assertSaveMessageSuccess"/>
19+
</actionGroup>
20+
</actionGroups>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminFormSaveAndDuplicateActionGroup">
12+
<annotations>
13+
<description>Clicks on 'Save and Duplicate'. Validates that the Success Message is present and correct.</description>
14+
</annotations>
15+
16+
<click selector="{{AdminProductFormActionSection.saveArrow}}" stepKey="openSaveDropDown"/>
17+
<click selector="{{AdminProductFormActionSection.saveAndDuplicate}}" stepKey="clickOnSaveAndDuplicate"/>
18+
<see selector="{{AdminProductMessagesSection.successMessage}}" stepKey="assertSaveSuccess" userInput="You saved the product."/>
19+
<see selector="{{AdminProductMessagesSection.successMessage}}" stepKey="assertDuplicateSuccess" userInput="You duplicated the product."/>
20+
</actionGroup>
21+
</actionGroups>

app/code/Magento/Ui/Test/Mftf/ActionGroup/AdminSaveAndCloseActionGroup.xml renamed to app/code/Magento/Ui/Test/Mftf/ActionGroup/_Deprecated_ActionGroup.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="AdminFormSaveAndClose">
1212
<annotations>
1313
<description>Clicks on 'Save and Close'. Validates that the Success Message is present.</description>
@@ -17,7 +17,6 @@
1717
<click selector="{{AdminProductFormActionSection.saveAndClose}}" stepKey="clickOnSaveAndClose"/>
1818
<seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="assertSaveMessageSuccess"/>
1919
</actionGroup>
20-
2120
<actionGroup name="AdminFormSaveAndDuplicate">
2221
<annotations>
2322
<description>Clicks on 'Save and Duplicate'. Validates that the Success Message is present and correct.</description>
@@ -27,5 +26,5 @@
2726
<click selector="{{AdminProductFormActionSection.saveAndDuplicate}}" stepKey="clickOnSaveAndDuplicate"/>
2827
<see selector="{{AdminProductMessagesSection.successMessage}}" stepKey="assertSaveSuccess" userInput="You saved the product."/>
2928
<see selector="{{AdminProductMessagesSection.successMessage}}" stepKey="assertDuplicateSuccess" userInput="You duplicated the product."/>
30-
</actionGroup>
29+
</actionGroup>
3130
</actionGroups>

0 commit comments

Comments
 (0)