Skip to content

Commit d1d48a0

Browse files
authored
ENGCOM-7790: [MFTF] Use action group to click AdminProductGridSection.firstRow #29000
2 parents 2d21e0b + 781ba9b commit d1d48a0

19 files changed

+38
-41
lines changed

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontAdminEditDataTest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@
8989
<argument name="product" value="BundleProduct"/>
9090
</actionGroup>
9191
<waitForPageLoad stepKey="waitForProductFilterLoad"/>
92-
<click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductPage"/>
93-
<waitForPageLoad stepKey="waitForProductPageLoad"/>
92+
<actionGroup ref="AdminProductGridSectionClickFirstRowActionGroup" stepKey="clickOnProductPage"/>
9493

9594
<!-- Change the product option title -->
9695
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle('0')}}" userInput="BundleOption2" stepKey="fillOptionTitle2"/>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AdminProductGridSectionClickFirstRowActionGroup">
11+
<annotations>
12+
<description>Click first row on the product grid page.</description>
13+
</annotations>
14+
15+
<click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductPage"/>
16+
<waitForPageLoad stepKey="waitForProductPageLoad"/>
17+
</actionGroup>
18+
</actionGroups>

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@
3838
<argument name="product" value="SimpleTwo"/>
3939
</actionGroup>
4040
<waitForPageLoad stepKey="waitForFiltersToBeApplied"/>
41-
<click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductPage"/>
42-
<waitForPageLoad stepKey="waitForProductPageLoad"/>
41+
<actionGroup ref="AdminProductGridSectionClickFirstRowActionGroup" stepKey="clickOnProductPage"/>
4342

4443
<!-- Fill out the form for the new category -->
4544
<actionGroup ref="FillNewProductCategoryActionGroup" stepKey="FillNewProductCategory">

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@
4444
<seeElement selector="{{AdminProductGridSection.columnHeader('Set Product as New from Date')}}" stepKey="seeNewFromDateColumn"/>
4545
<waitForPageLoad stepKey="waitforFiltersToApply"/>
4646
<actionGroup ref="FilterProductGridBySetNewFromDateActionGroup" stepKey="filterProductGridToCheckSetAsNewColumn"/>
47-
<click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnFirstRowProductGrid"/>
48-
<waitForPageLoad stepKey="waitForProductEditPageToLoad"/>
47+
<actionGroup ref="AdminProductGridSectionClickFirstRowActionGroup" stepKey="clickOnFirstRowProductGrid"/>
4948
<actionGroup ref="AdminFormSaveAndCloseActionGroup" stepKey="saveAndCloseProductForm"/>
5049
<click selector="{{AdminProductGridFilterSection.filters}}" stepKey="expandFilters"/>
5150
<seeInField selector="{{AdminProductGridFilterSection.newFromDateFilter}}" userInput="05/16/2018" stepKey="checkForNewFromDate"/>

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@
5050
<actionGroup ref="FilterProductGridByName2ActionGroup" stepKey="filterByName">
5151
<argument name="name" value="$$createConfigProduct.name$$"/>
5252
</actionGroup>
53-
<click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductName"/>
54-
<waitForPageLoad stepKey="waitForProductEditPageToLoad"/>
53+
<actionGroup ref="AdminProductGridSectionClickFirstRowActionGroup" stepKey="clickOnProductName"/>
5554
<!--Create configurations for the product-->
5655
<comment userInput="Create configurations for the product" stepKey="createConfigurations"/>
5756
<conditionalClick selector="{{AdminProductFormConfigurationsSection.sectionHeader}}" dependentSelector="{{AdminProductFormConfigurationsSection.createConfigurations}}" visible="false" stepKey="expandConfigurationsTab1"/>

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@
5757
<argument name="product" value="ApiConfigurableProduct"/>
5858
</actionGroup>
5959
<waitForPageLoad stepKey="waitForProductFilterLoad"/>
60-
<click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductPage"/>
61-
<waitForPageLoad stepKey="waitForProductPageLoad"/>
60+
<actionGroup ref="AdminProductGridSectionClickFirstRowActionGroup" stepKey="clickOnProductPage"/>
6261

6362
<!-- Create configurations based off the Text Swatch we created earlier -->
6463
<click selector="{{AdminProductFormConfigurationsSection.createConfigurations}}" stepKey="clickCreateConfigurations"/>

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest/AdminConfigurableProductChildrenOutOfStockTest.xml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@
9999
<argument name="product" value="ApiSimpleOne"/>
100100
</actionGroup>
101101
<waitForPageLoad stepKey="waitForFiltersToBeApplied"/>
102-
<click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductPage"/>
103-
<waitForPageLoad stepKey="waitForProductPageLoad"/>
102+
<actionGroup ref="AdminProductGridSectionClickFirstRowActionGroup" stepKey="clickOnProductPage"/>
104103

105104
<!-- Edit the quantity of the simple first product as 0 -->
106105
<fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="0" stepKey="fillProductQuantity"/>
@@ -118,8 +117,7 @@
118117
<argument name="product" value="ApiSimpleTwo"/>
119118
</actionGroup>
120119
<waitForPageLoad stepKey="waitForFiltersToBeApplied2"/>
121-
<click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductPage2"/>
122-
<waitForPageLoad stepKey="waitForProductPageLoad2"/>
120+
<actionGroup ref="AdminProductGridSectionClickFirstRowActionGroup" stepKey="clickOnProductPage2"/>
123121

124122
<!-- Edit the quantity of the second simple product as 0 -->
125123
<fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="0" stepKey="fillProductQuantity2"/>

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminConfigurableProductOutOfStockTest/AdminConfigurableProductOutOfStockAndDeleteCombinationTest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,7 @@
108108
<argument name="product" value="ApiSimpleTwo"/>
109109
</actionGroup>
110110
<waitForPageLoad stepKey="waitForFiltersToBeApplied2"/>
111-
<click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductPage2"/>
112-
<waitForPageLoad stepKey="waitForProductPageLoad2"/>
111+
<actionGroup ref="AdminProductGridSectionClickFirstRowActionGroup" stepKey="clickOnProductPage2"/>
113112

114113
<!-- Edit the quantity of the second simple product as 0 -->
115114
<fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="0" stepKey="fillProductQuantity2"/>

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,7 @@
122122
<argument name="product" value="ApiConfigurableProduct"/>
123123
</actionGroup>
124124
<waitForPageLoad stepKey="waitForProductFilterLoad"/>
125-
126-
<click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductPage"/>
127-
<waitForPageLoad stepKey="waitForProductPageLoad"/>
125+
<actionGroup ref="AdminProductGridSectionClickFirstRowActionGroup" stepKey="clickOnProductPage"/>
128126

129127
<!-- change the option on the first attribute -->
130128
<selectOption stepKey="clickFirstAttribute" selector="{{ModifyAttributes.nthExistingAttribute($$createModifiableProductAttribute.default_frontend_label$$)}}" userInput="option1"/>

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,7 @@
9393
</actionGroup>
9494

9595
<!-- Assert configurable product on admin product page -->
96-
<click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductPage"/>
97-
<waitForPageLoad stepKey="waitForProductPageLoad"/>
96+
<actionGroup ref="AdminProductGridSectionClickFirstRowActionGroup" stepKey="clickOnProductPage"/>
9897
<actionGroup ref="AssertConfigurableProductOnAdminProductPageActionGroup" stepKey="assertConfigurableProductOnAdminProductPage">
9998
<argument name="product" value="ApiConfigurableProduct"/>
10099
</actionGroup>

0 commit comments

Comments
 (0)