Skip to content

Commit e4fde6b

Browse files
committed
added deprecation, refactored
1 parent fe6298b commit e4fde6b

5 files changed

+224
-79
lines changed

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminAssertManageStockOnEditPageActionGroup.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="AdminAssertManageStockOnEditPageActionGroup">
1212
<annotations>
13-
<description>Check if manageStock value is correct (the Product Edit page should be opened in Admin prior this check).</description>
13+
<description>Check if manageStock value is correct
14+
(the Product Edit page->Advanced Inventory section should be opened in Admin prior this check).</description>
1415
</annotations>
1516
<arguments>
1617
<argument name="manageStock" type="string"/>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminAssertProductInfoOnEditPageActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="AdminAssertProductInfoOnEditPageActionGroup">
1212
<annotations>
13-
<description>Validates next fields on the Edit Product Page: name, sku, price, quantity, stock status, tax class, weight, weigh select, visibility, url key</description>
13+
<description>Validates next fields on the Product Edit Page: name, sku, price, quantity, stock status, tax class, weight, weigh select, visibility, url key</description>
1414
</annotations>
1515
<arguments>
1616
<argument name="product" type="entity"/>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontAssertProductStockStatusOnProductPageActionGroup.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1010
<actionGroup name="StorefrontAssertProductStockStatusOnProductPageActionGroup">
1111
<annotations>
12-
<description>Validate that the provided Product Stock Status is present and correct (the Product Detail page should be opened on Storefront prior this check)</description>
12+
<description>Validates that the provided Product Stock Status is present and correct
13+
(the Product Detail page should be opened on Storefront prior this check)</description>
1314
</annotations>
1415
<arguments>
1516
<argument name="productStockStatus" type="string"/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AdminUpdateSimpleProductWithRegularPriceInStockEnabledFlatCatalogTest">
12+
<annotations>
13+
<stories value="Update Simple Product"/>
14+
<title value="Update Simple Product with Regular Price (In Stock) Enabled Flat"/>
15+
<description value="Test log in to Update Simple Product and Update Simple Product with Regular Price (In Stock) Enabled Flat"/>
16+
<testCaseId value="MC-10818"/>
17+
<severity value="CRITICAL"/>
18+
<group value="catalog"/>
19+
<group value="mtf_migrated"/>
20+
</annotations>
21+
<before>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23+
<magentoCLI stepKey="setFlatCatalogProduct" command="config:set catalog/frontend/flat_catalog_product 1"/>
24+
<createData entity="SimpleSubCategory" stepKey="initialCategoryEntity"/>
25+
<createData entity="defaultSimpleProduct" stepKey="initialSimpleProduct">
26+
<requiredEntity createDataKey="initialCategoryEntity"/>
27+
</createData>
28+
<createData entity="SimpleSubCategory" stepKey="categoryEntity"/>
29+
</before>
30+
<after>
31+
<deleteData stepKey="deleteSimpleSubCategory" createDataKey="initialCategoryEntity"/>
32+
<deleteData stepKey="deleteSimpleSubCategory2" createDataKey="categoryEntity"/>
33+
<actionGroup ref="DeleteProductBySkuActionGroup" stepKey="deleteCreatedProduct">
34+
<argument name="sku" value="{{simpleProductEnabledFlat.sku}}"/>
35+
</actionGroup>
36+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
37+
<magentoCLI stepKey="unsetFlatCatalogProduct" command="config:set catalog/frontend/flat_catalog_product 0"/>
38+
</after>
39+
40+
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="openProductCatalogPage"/>
41+
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openProductPage">
42+
<argument name="product" value="$$initialSimpleProduct$$"/>
43+
</actionGroup>
44+
45+
<actionGroup ref="AdminClickOnAdvancedInventoryLinkActionGroup" stepKey="clickAdvancedInventoryLink"/>
46+
<actionGroup ref="AdminSetManageStockConfigActionGroup" stepKey="setManageStockConfig">
47+
<argument name="value" value="No"/>
48+
</actionGroup>
49+
<actionGroup ref="AdminSubmitAdvancedInventoryFormActionGroup" stepKey="clickDoneButtonOnAdvancedInventorySection"/>
50+
51+
<actionGroup ref="AdminAssignTwoCategoriesToProductActionGroup" stepKey="assignCategories">
52+
<argument name="categoryName" value="$$initialCategoryEntity.name$$"/>
53+
<argument name="categoryTwoName" value="$$categoryEntity.name$$"/>
54+
</actionGroup>
55+
56+
<actionGroup ref="AdminFillMainProductFormActionGroup" stepKey="fillSimpleProductInfo">
57+
<argument name="product" value="simpleProductEnabledFlat"/>
58+
</actionGroup>
59+
60+
<actionGroup ref="AdminProductFormSaveButtonClickActionGroup" stepKey="clickSaveButton"/>
61+
62+
<see selector="{{AdminProductFormSection.successMessage}}" userInput="You saved the product." stepKey="seeSimpleProductSavedSuccessMessage"/>
63+
64+
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="openProductCatalogPage1"/>
65+
<actionGroup ref="OpenEditProductOnBackendActionGroup" stepKey="openProductPage1">
66+
<argument name="product" value="simpleProductEnabledFlat"/>
67+
</actionGroup>
68+
69+
<actionGroup ref="AdminClickOnAdvancedInventoryLinkActionGroup" stepKey="clickTheAdvancedInventoryLink1"/>
70+
<actionGroup ref="AdminAssertManageStockOnEditPageActionGroup" stepKey="assertManageStock1">
71+
<argument name="manageStock" value="No"/>
72+
</actionGroup>
73+
<actionGroup ref="AdminSubmitAdvancedInventoryFormActionGroup" stepKey="clickDoneButtonOnAdvancedInventorySection1"/>
74+
75+
<actionGroup ref="AdminAssertProductIsAssignedToCategoryActionGroup" stepKey="checkifProductIsAssignedToInitialCategory">
76+
<argument name="categoryName" value="$$initialCategoryEntity.name$$"/>
77+
</actionGroup>
78+
79+
<actionGroup ref="AdminAssertProductIsAssignedToCategoryActionGroup" stepKey="checkifProductIsAssignedToCategoryTwo">
80+
<argument name="categoryName" value="$$categoryEntity.name$$"/>
81+
</actionGroup>
82+
83+
<actionGroup ref="AdminAssertProductInfoOnEditPageActionGroup" stepKey="assertProductInfo">
84+
<argument name="product" value="simpleProductEnabledFlat"/>
85+
</actionGroup>
86+
87+
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="openCategoryPage">
88+
<argument name="category" value="$categoryEntity$"/>
89+
</actionGroup>
90+
91+
<actionGroup ref="AssertStorefrontProductIsPresentOnCategoryPageActionGroup" stepKey="seeSimpleProductNameOnCategoryPage">
92+
<argument name="productName" value="{{simpleProductEnabledFlat.name}}"/>
93+
</actionGroup>
94+
95+
<actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="goToProductPage">
96+
<argument name="productUrlKey" value="{{simpleProductEnabledFlat.urlKey}}"/>
97+
</actionGroup>
98+
99+
<actionGroup ref="StorefrontAssertProductNameOnProductPageActionGroup" stepKey="seeSimpleProductNameOnStoreFrontPage">
100+
<argument name="productName" value="{{simpleProductEnabledFlat.name}}"/>
101+
</actionGroup>
102+
<actionGroup ref="StorefrontAssertProductPriceOnProductPageActionGroup" stepKey="seeSimpleProductPriceOnStoreFrontPage">
103+
<argument name="productPrice" value="{{simpleProductEnabledFlat.price}}"/>
104+
</actionGroup>
105+
<actionGroup ref="StorefrontAssertProductSkuOnProductPageActionGroup" stepKey="seeSimpleProductSKUOnStoreFrontPage">
106+
<argument name="productSku" value="{{simpleProductEnabledFlat.sku}}"/>
107+
</actionGroup>
108+
<actionGroup ref="StorefrontAssertProductStockStatusOnProductPageActionGroup" stepKey="seeSimpleProductStockStatusOnStoreFrontPage">
109+
<argument name="productStockStatus" value="{{simpleProductEnabledFlat.storefrontStatus}}"/>
110+
</actionGroup>
111+
112+
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomepage"/>
113+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="searchForSku">
114+
<argument name="phrase" value="{{simpleProductEnabledFlat.sku}}"/>
115+
</actionGroup>
116+
<actionGroup ref="StorefrontOpenProductFromQuickSearchActionGroup" stepKey="openAndCheckProduct">
117+
<argument name="productName" value="{{simpleProductEnabledFlat.name}}"/>
118+
<argument name="productUrlKey" value="{{simpleProductEnabledFlat.urlKey}}"/>
119+
</actionGroup>
120+
121+
</test>
122+
</tests>

0 commit comments

Comments
 (0)