Skip to content

Commit 43837b2

Browse files
committed
Use action group to click AdminProductGridSection.firstRow
1 parent 735579d commit 43837b2

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
@@ -91,8 +91,7 @@
9191
<argument name="product" value="BundleProduct"/>
9292
</actionGroup>
9393
<waitForPageLoad stepKey="waitForProductFilterLoad"/>
94-
<click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductPage"/>
95-
<waitForPageLoad stepKey="waitForProductPageLoad"/>
94+
<actionGroup ref="AdminProductGridSectionClickFirstRowActionGroup" stepKey="clickOnProductPage"/>
9695

9796
<!-- Change the product option title -->
9897
<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
@@ -39,8 +39,7 @@
3939
<argument name="product" value="SimpleTwo"/>
4040
</actionGroup>
4141
<waitForPageLoad stepKey="waitForFiltersToBeApplied"/>
42-
<click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductPage"/>
43-
<waitForPageLoad stepKey="waitForProductPageLoad"/>
42+
<actionGroup ref="AdminProductGridSectionClickFirstRowActionGroup" stepKey="clickOnProductPage"/>
4443

4544
<!-- Fill out the form for the new category -->
4645
<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
@@ -46,8 +46,7 @@
4646
<seeElement selector="{{AdminProductGridSection.columnHeader('Set Product as New from Date')}}" stepKey="seeNewFromDateColumn"/>
4747
<waitForPageLoad stepKey="waitforFiltersToApply"/>
4848
<actionGroup ref="FilterProductGridBySetNewFromDateActionGroup" stepKey="filterProductGridToCheckSetAsNewColumn"/>
49-
<click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnFirstRowProductGrid"/>
50-
<waitForPageLoad stepKey="waitForProductEditPageToLoad"/>
49+
<actionGroup ref="AdminProductGridSectionClickFirstRowActionGroup" stepKey="clickOnFirstRowProductGrid"/>
5150
<actionGroup ref="AdminFormSaveAndCloseActionGroup" stepKey="saveAndCloseProductForm"/>
5251
<click selector="{{AdminProductGridFilterSection.filters}}" stepKey="expandFilters"/>
5352
<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
@@ -51,8 +51,7 @@
5151
<actionGroup ref="FilterProductGridByName2ActionGroup" stepKey="filterByName">
5252
<argument name="name" value="$$createConfigProduct.name$$"/>
5353
</actionGroup>
54-
<click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductName"/>
55-
<waitForPageLoad stepKey="waitForProductEditPageToLoad"/>
54+
<actionGroup ref="AdminProductGridSectionClickFirstRowActionGroup" stepKey="clickOnProductName"/>
5655
<!--Create configurations for the product-->
5756
<comment userInput="Create configurations for the product" stepKey="createConfigurations"/>
5857
<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
@@ -58,8 +58,7 @@
5858
<argument name="product" value="ApiConfigurableProduct"/>
5959
</actionGroup>
6060
<waitForPageLoad stepKey="waitForProductFilterLoad"/>
61-
<click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductPage"/>
62-
<waitForPageLoad stepKey="waitForProductPageLoad"/>
61+
<actionGroup ref="AdminProductGridSectionClickFirstRowActionGroup" stepKey="clickOnProductPage"/>
6362

6463
<!-- Create configurations based off the Text Swatch we created earlier -->
6564
<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
@@ -100,8 +100,7 @@
100100
<argument name="product" value="ApiSimpleOne"/>
101101
</actionGroup>
102102
<waitForPageLoad stepKey="waitForFiltersToBeApplied"/>
103-
<click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductPage"/>
104-
<waitForPageLoad stepKey="waitForProductPageLoad"/>
103+
<actionGroup ref="AdminProductGridSectionClickFirstRowActionGroup" stepKey="clickOnProductPage"/>
105104

106105
<!-- Edit the quantity of the simple first product as 0 -->
107106
<fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="0" stepKey="fillProductQuantity"/>
@@ -120,8 +119,7 @@
120119
<argument name="product" value="ApiSimpleTwo"/>
121120
</actionGroup>
122121
<waitForPageLoad stepKey="waitForFiltersToBeApplied2"/>
123-
<click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductPage2"/>
124-
<waitForPageLoad stepKey="waitForProductPageLoad2"/>
122+
<actionGroup ref="AdminProductGridSectionClickFirstRowActionGroup" stepKey="clickOnProductPage2"/>
125123

126124
<!-- Edit the quantity of the second simple product as 0 -->
127125
<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
@@ -109,8 +109,7 @@
109109
<argument name="product" value="ApiSimpleTwo"/>
110110
</actionGroup>
111111
<waitForPageLoad stepKey="waitForFiltersToBeApplied2"/>
112-
<click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductPage2"/>
113-
<waitForPageLoad stepKey="waitForProductPageLoad2"/>
112+
<actionGroup ref="AdminProductGridSectionClickFirstRowActionGroup" stepKey="clickOnProductPage2"/>
114113

115114
<!-- Edit the quantity of the second simple product as 0 -->
116115
<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
@@ -123,9 +123,7 @@
123123
<argument name="product" value="ApiConfigurableProduct"/>
124124
</actionGroup>
125125
<waitForPageLoad stepKey="waitForProductFilterLoad"/>
126-
127-
<click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductPage"/>
128-
<waitForPageLoad stepKey="waitForProductPageLoad"/>
126+
<actionGroup ref="AdminProductGridSectionClickFirstRowActionGroup" stepKey="clickOnProductPage"/>
129127

130128
<!-- change the option on the first attribute -->
131129
<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
@@ -95,8 +95,7 @@
9595
</actionGroup>
9696

9797
<!-- Assert configurable product on admin product page -->
98-
<click selector="{{AdminProductGridSection.firstRow}}" stepKey="clickOnProductPage"/>
99-
<waitForPageLoad stepKey="waitForProductPageLoad"/>
98+
<actionGroup ref="AdminProductGridSectionClickFirstRowActionGroup" stepKey="clickOnProductPage"/>
10099
<actionGroup ref="AssertConfigurableProductOnAdminProductPageActionGroup" stepKey="assertConfigurableProductOnAdminProductPage">
101100
<argument name="product" value="ApiConfigurableProduct"/>
102101
</actionGroup>

0 commit comments

Comments
 (0)