Skip to content

Commit 653a743

Browse files
committed
use action group for assertion
1 parent 878b1c9 commit 653a743

18 files changed

+135
-27
lines changed

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAndSwitchProductType/AdminCreateSimpleProductSwitchToVirtualTest.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@
5454
<actionGroup ref="FilterProductGridByNameActionGroup" stepKey="searchForProduct">
5555
<argument name="product" value="_defaultProduct"/>
5656
</actionGroup>
57-
<see selector="{{AdminProductGridSection.productGridCell('1', 'Type')}}" userInput="Virtual Product" stepKey="seeProductTypeInGrid"/>
57+
<actionGroup ref="AssertAdminProductGridCellActionGroup" stepKey="seeProductTypeInGrid">
58+
<argument name="row" value="1"/>
59+
<argument name="column" value="Type"/>
60+
<argument name="value" value="Virtual Product"/>
61+
</actionGroup>
5862
<actionGroup ref="AssertProductInStorefrontProductPageActionGroup" stepKey="AssertProductInStorefrontProductPage">
5963
<argument name="product" value="_defaultProduct"/>
6064
</actionGroup>

app/code/Magento/Catalog/Test/Mftf/Test/AdminCreateAndSwitchProductType/AdminCreateVirtualProductSwitchToSimpleTest.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
<actionGroup ref="FillMainProductFormActionGroup" stepKey="fillProductForm">
2626
<argument name="product" value="_defaultProduct"/>
2727
</actionGroup>
28-
<see selector="{{AdminProductGridSection.productGridCell('1', 'Type')}}" userInput="Simple Product" stepKey="seeProductTypeInGrid"/>
28+
<actionGroup ref="AssertAdminProductGridCellActionGroup" stepKey="seeProductTypeInGrid">
29+
<argument name="row" value="1"/>
30+
<argument name="column" value="Type"/>
31+
<argument name="value" value="Simple Product"/>
32+
</actionGroup>
2933
</test>
3034
</tests>

app/code/Magento/Catalog/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminDownloadableProductTypeSwitchingToSimpleProductTest.xml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,16 @@
3333
<actionGroup ref="FilterProductGridBySku2ActionGroup" stepKey="filterSimpleProductGridBySku">
3434
<argument name="sku" value="$$createProduct.sku$$"/>
3535
</actionGroup>
36-
<see selector="{{AdminProductGridSection.productGridCell('1', 'Name')}}" userInput="$$createProduct.name$$" stepKey="seeSimpleProductNameInGrid"/>
37-
<see selector="{{AdminProductGridSection.productGridCell('1', 'Type')}}" userInput="Simple Product" stepKey="seeSimpleProductTypeInGrid"/>
36+
<actionGroup ref="AssertAdminProductGridCellActionGroup" stepKey="seeSimpleProductNameInGrid">
37+
<argument name="row" value="1"/>
38+
<argument name="column" value="Name"/>
39+
<argument name="value" value="$$createProduct.name$$"/>
40+
</actionGroup>
41+
<actionGroup ref="AssertAdminProductGridCellActionGroup" stepKey="seeSimpleProductTypeInGrid">
42+
<argument name="row" value="1"/>
43+
<argument name="column" value="Type"/>
44+
<argument name="value" value="Simple Product"/>
45+
</actionGroup>
3846
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearSimpleProductFilters"/>
3947
<!--Assert simple product on storefront-->
4048
<comment userInput="Assert simple product on storefront" stepKey="commentAssertSimpleProductOnStorefront"/>

app/code/Magento/Catalog/Test/Mftf/Test/AdminProductTypeSwitchingOnEditingTest/AdminVirtualProductTypeSwitchingToDownloadableProductTest.xml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,16 @@
5353
<actionGroup ref="FilterProductGridBySku2ActionGroup" stepKey="filterProductGridBySku">
5454
<argument name="sku" value="$$createProduct.sku$$"/>
5555
</actionGroup>
56-
<see selector="{{AdminProductGridSection.productGridCell('1', 'Name')}}" userInput="$$createProduct.name$$" stepKey="seeDownloadableProductNameInGrid"/>
57-
<see selector="{{AdminProductGridSection.productGridCell('1', 'Type')}}" userInput="Downloadable Product" stepKey="seeDownloadableProductTypeInGrid"/>
56+
<actionGroup ref="AssertAdminProductGridCellActionGroup" stepKey="seeDownloadableProductNameInGrid">
57+
<argument name="row" value="1"/>
58+
<argument name="column" value="Name"/>
59+
<argument name="value" value="$$createProduct.name$$"/>
60+
</actionGroup>
61+
<actionGroup ref="AssertAdminProductGridCellActionGroup" stepKey="seeDownloadableProductTypeInGrid">
62+
<argument name="row" value="1"/>
63+
<argument name="column" value="Type"/>
64+
<argument name="value" value="Downloadable Product"/>
65+
</actionGroup>
5866
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearDownloadableProductFilters"/>
5967
<!--Assert downloadable product on storefront-->
6068
<comment userInput="Assert downloadable product on storefront" stepKey="commentAssertDownloadableProductOnStorefront"/>

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

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@
8282
<argument name="keyword" value="SimpleProduct.name"/>
8383
</actionGroup>
8484
<seeNumberOfElements selector="{{AdminProductGridSection.productGridRows}}" userInput="1" stepKey="seeOnlyOneProductInGrid"/>
85-
<see selector="{{AdminProductGridSection.productGridCell('1', 'Name')}}" userInput="{{SimpleProduct.name}}" stepKey="seeOnlySimpleProductInGrid"/>
85+
<actionGroup ref="AssertAdminProductGridCellActionGroup" stepKey="seeOnlySimpleProductInGrid">
86+
<argument name="row" value="1"/>
87+
<argument name="column" value="Name"/>
88+
<argument name="value" value="{{SimpleProduct.name}}"/>
89+
</actionGroup>
8690

8791
<!--Paging works-->
8892
<actionGroup ref="ResetProductGridToDefaultViewActionGroup" stepKey="setProductGridToDefaultPagination"/>
@@ -108,7 +112,11 @@
108112
<argument name="product" value="GroupedProduct"/>
109113
</actionGroup>
110114
<seeNumberOfElements selector="{{AdminProductGridSection.productGridRows}}" userInput="1" stepKey="seeOneMatchingSkuInProductGrid"/>
111-
<see selector="{{AdminProductGridSection.productGridCell('1','SKU')}}" userInput="{{GroupedProduct.sku}}" stepKey="seeProductInFilteredGridSku"/>
115+
<actionGroup ref="AssertAdminProductGridCellActionGroup" stepKey="seeProductInFilteredGridSku">
116+
<argument name="row" value="1"/>
117+
<argument name="column" value="SKU"/>
118+
<argument name="value" value="{{GroupedProduct.sku}}"/>
119+
</actionGroup>
112120
<!--Filter by price-->
113121
<actionGroup ref="FilterProductGridByPriceRangeActionGroup" stepKey="filterProductGridByPrice">
114122
<argument name="filter" value="PriceFilterRange"/>
@@ -197,7 +205,11 @@
197205
<actionGroup ref="FilterProductGridBySkuActionGroup" stepKey="filterProductGridToCheckWeightColumn">
198206
<argument name="product" value="SimpleProduct"/>
199207
</actionGroup>
200-
<see selector="{{AdminProductGridSection.productGridCell('1','Weight')}}" userInput="{{SimpleProduct.weight}}" stepKey="seeCorrectProductWeightInGrid"/>
208+
<actionGroup ref="AssertAdminProductGridCellActionGroup" stepKey="seeCorrectProductWeightInGrid">
209+
<argument name="row" value="1"/>
210+
<argument name="column" value="Weight"/>
211+
<argument name="value" value="{{SimpleProduct.weight}}"/>
212+
</actionGroup>
201213
<!--END Admin uses product grid-->
202214

203215
<!--Admin creates category-->

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,11 @@
8585
</actionGroup>
8686
<waitForPageLoad stepKey="wait2"/>
8787
<seeNumberOfElements selector="{{AdminProductGridSection.productGridRows}}" userInput="1" stepKey="seeOneResult"/>
88-
<see selector="{{AdminProductGridSection.productGridCell('1', 'Name')}}" userInput="{{ApiConfigurableProduct.name}}" stepKey="seeInGrid"/>
88+
<actionGroup ref="AssertAdminProductGridCellActionGroup" stepKey="seeInGrid">
89+
<argument name="row" value="1"/>
90+
<argument name="column" value="Name"/>
91+
<argument name="value" value="{{ApiConfigurableProduct.name}}"/>
92+
</actionGroup>
8993
<see selector="{{AdminProductGridFilterSection.enabledFilters}}" userInput="{{ApiConfigurableProduct.name}}" stepKey="seeInActiveFilters"/>
9094
</test>
9195
</tests>

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndSwitchProductType/AdminCreateConfigurableProductSwitchToSimpleTest.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
<actionGroup ref="FillMainProductFormActionGroup" stepKey="fillProductForm">
2525
<argument name="product" value="_defaultProduct"/>
2626
</actionGroup>
27-
<see selector="{{AdminProductGridSection.productGridCell('1', 'Type')}}" userInput="Simple Product" stepKey="seeProductTypeInGrid"/>
27+
<actionGroup ref="AssertAdminProductGridCellActionGroup" stepKey="seeProductTypeInGrid">
28+
<argument name="row" value="1"/>
29+
<argument name="column" value="Type"/>
30+
<argument name="value" value="Simple Product"/>
31+
</actionGroup>
2832
</test>
2933
</tests>

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndSwitchProductType/AdminCreateConfigurableProductSwitchToVirtualTest.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
<actionGroup ref="GoToSpecifiedCreateProductPageActionGroup" stepKey="openProductFillForm">
2222
<argument name="productType" value="configurable"/>
2323
</actionGroup>
24-
<see selector="{{AdminProductGridSection.productGridCell('1', 'Type')}}" userInput="Virtual Product" stepKey="seeProductTypeInGrid"/>
24+
<actionGroup ref="AssertAdminProductGridCellActionGroup" stepKey="seeProductTypeInGrid">
25+
<argument name="row" value="1"/>
26+
<argument name="column" value="Type"/>
27+
<argument name="value" value="Virtual Product"/>
28+
</actionGroup>
2529
</test>
2630
</tests>

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndSwitchProductType/AdminCreateDownloadableProductSwitchToConfigurableTest.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@
6767
<actionGroup ref="FilterProductGridByNameActionGroup" stepKey="searchForProduct">
6868
<argument name="product" value="_defaultProduct"/>
6969
</actionGroup>
70-
<see selector="{{AdminProductGridSection.productGridCell('2', 'Type')}}" userInput="Configurable Product" stepKey="seeProductTypeInGrid"/>
70+
<actionGroup ref="AssertAdminProductGridCellActionGroup" stepKey="seeProductTypeInGrid">
71+
<argument name="row" value="2"/>
72+
<argument name="column" value="Type"/>
73+
<argument name="value" value="Configurable Product"/>
74+
</actionGroup>
7175
<actionGroup ref="AssertProductInStorefrontProductPageActionGroup" stepKey="assertProductInStorefrontProductPage">
7276
<argument name="product" value="_defaultProduct"/>
7377
</actionGroup>

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/AdminCreateAndSwitchProductType/AdminCreateSimpleProductSwitchToConfigurableTest.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@
4040
<argument name="attributeCode" value="$$createConfigProductAttribute.attribute_code$$"/>
4141
</actionGroup>
4242
<actionGroup ref="SaveConfiguredProductActionGroup" stepKey="saveProductForm"/>
43-
<see selector="{{AdminProductGridSection.productGridCell('2', 'Type')}}" userInput="Configurable Product" stepKey="seeProductTypeInGrid"/>
43+
<actionGroup ref="AssertAdminProductGridCellActionGroup" stepKey="seeProductTypeInGrid">
44+
<argument name="row" value="2"/>
45+
<argument name="column" value="Type"/>
46+
<argument name="value" value="Configurable Product"/>
47+
</actionGroup>
4448
<!-- Verify product on store front -->
4549
<comment userInput="Verify product on store front" stepKey="commentVerifyProductGrid"/>
4650
<actionGroup ref="VerifyOptionInProductStorefrontActionGroup" stepKey="verifyConfigurableOption" after="AssertProductInStorefrontProductPage">

0 commit comments

Comments
 (0)