Skip to content

Commit 06249d5

Browse files
authored
Merge branch '2.4-develop' into 2.4-develop
2 parents fa82a64 + 6104113 commit 06249d5

File tree

36 files changed

+717
-250
lines changed

36 files changed

+717
-250
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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="AdminFillInProductDescriptionActionGroup">
12+
<arguments>
13+
<argument name="description" type="string"/>
14+
</arguments>
15+
<fillField selector="{{AdminProductContentSection.descriptionTextArea}}" userInput="{{description}}" stepKey="fillLongDescription"/>
16+
</actionGroup>
17+
</actionGroups>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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="AdminFillInProductShortDescriptionActionGroup">
12+
<arguments>
13+
<argument name="shortDescription" type="string"/>
14+
</arguments>
15+
<fillField selector="{{AdminProductContentSection.shortDescriptionTextArea}}" userInput="{{shortDescription}}" stepKey="fillShortDescription"/>
16+
</actionGroup>
17+
</actionGroups>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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="AdminOpenContentSectionOnProductPageActionGroup">
12+
<scrollTo selector="{{AdminProductContentSection.sectionHeader}}" x="0" y="-100" stepKey="scrollToContentSection"/>
13+
<click selector="{{AdminProductContentSection.sectionHeader}}" stepKey="openContentSection"/>
14+
</actionGroup>
15+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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="AssertAdminProductShortDescriptionOnProductEditFormActionGroup">
12+
<arguments>
13+
<argument name="productShortDescription" type="string"/>
14+
</arguments>
15+
<seeInField selector="{{AdminProductContentSection.shortDescriptionTextArea}}" userInput="{{productShortDescription}}" stepKey="seeProductShortDescription"/>
16+
</actionGroup>
17+
</actionGroups>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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="AssertStorefrontProductDescriptionActionGroup">
12+
<arguments>
13+
<argument name="productDescription" type="string"/>
14+
</arguments>
15+
<see selector="{{StorefrontProductInfoMainSection.productDescription}}" userInput="{{productDescription}}" stepKey="seeLongDescriptionAtStorefront"/>
16+
</actionGroup>
17+
</actionGroups>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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="AssertStorefrontShortProductDescriptionActionGroup">
12+
<arguments>
13+
<argument name="productShortDescription" type="string"/>
14+
</arguments>
15+
<see selector="{{StorefrontProductInfoMainSection.productShortDescription}}" userInput="{{productShortDescription}}" stepKey="seeShortDescriptionAtStorefront"/>
16+
</actionGroup>
17+
</actionGroups>

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

Lines changed: 64 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -39,50 +39,86 @@
3939
<argument name="product" value="SimpleProduct"/>
4040
</actionGroup>
4141
<!-- Update product Advanced Inventory setting -->
42-
<click stepKey="openSelectedProduct" selector="{{AdminProductGridSection.productRowBySku($$createSimpleProduct.sku$$)}}"/>
43-
<waitForPageLoad stepKey="waitForProductToLoad"/>
42+
<actionGroup ref="AdminProductGridSectionClickFirstRowActionGroup" stepKey="openSelectedProduct"/>
43+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForProductToLoad"/>
4444
<actionGroup ref="AdminClickOnAdvancedInventoryLinkActionGroup" stepKey="clickOnAdvancedInventoryLink"/>
45-
<uncheckOption selector="{{AdminProductFormAdvancedInventorySection.useConfigSettings}}" stepKey="uncheckConfigSetting"/>
46-
<selectOption selector="{{AdminProductFormAdvancedInventorySection.manageStock}}" userInput="Yes" stepKey="clickOnManageStock"/>
47-
<fillField selector="{{AdminProductFormAdvancedInventorySection.advancedInventoryQty}}" userInput="5" stepKey="fillProductQty"/>
48-
<uncheckOption selector="{{AdminProductFormAdvancedInventorySection.miniQtyConfigSetting}}" stepKey="uncheckMiniQtyCheckBox"/>
49-
<fillField selector="{{AdminProductFormAdvancedInventorySection.miniQtyAllowedInCart}}" userInput="1" stepKey="fillMiniAllowedQty"/>
50-
<uncheckOption selector="{{AdminProductFormAdvancedInventorySection.maxiQtyConfigSetting}}" stepKey="uncheckMaxQtyCheckBox"/>
51-
<fillField selector="{{AdminProductFormAdvancedInventorySection.maxiQtyAllowedInCart}}" userInput="10000" stepKey="fillMaxAllowedQty"/>
52-
<selectOption selector="{{AdminProductFormAdvancedInventorySection.qtyUsesDecimals}}" userInput="Yes" stepKey="selectQuatityUsesDecimal"/>
53-
<uncheckOption selector="{{AdminProductFormAdvancedInventorySection.notifyBelowQtyConfigSetting}}" stepKey="uncheckNotifyBelowQtyheckBox"/>
54-
<fillField selector="{{AdminProductFormAdvancedInventorySection.notifyBelowQty}}" userInput="1" stepKey="fillNotifyBelowQty"/>
45+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="uncheckConfigSetting"/>
46+
<actionGroup ref="AdminSetManageStockConfigActionGroup" stepKey="clickOnManageStock">
47+
<argument name="value" value="Yes"/>
48+
</actionGroup>
49+
<actionGroup ref="AdminFillAdvancedInventoryQtyActionGroup" stepKey="fillProductQty">
50+
<argument name="qty" value="5"/>
51+
</actionGroup>
52+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="uncheckMiniQtyCheckBox"/>
53+
<actionGroup ref="AdminSetMinAllowedQtyForProductActionGroup" stepKey="fillMiniAllowedQty">
54+
<argument name="qty" value="1"/>
55+
</actionGroup>
56+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="uncheckMaxQtyCheckBox"/>
57+
<actionGroup ref="AdminSetMaxAllowedQtyForProductActionGroup" stepKey="fillMaxAllowedQty">
58+
<argument name="qty" value="1000"/>
59+
</actionGroup>
60+
<actionGroup ref="AdminSetQtyUsesDecimalsConfigActionGroup" stepKey="selectQuatityUsesDecimal">
61+
<argument name="value" value="Yes"/>
62+
</actionGroup>
63+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="uncheckNotifyBelowQtyheckBox"/>
64+
<actionGroup ref="AdminSetNotifyBelowQtyValueActionGroup" stepKey="fillNotifyBelowQty">
65+
<argument name="qty" value="1"/>
66+
</actionGroup>
5567
<actionGroup ref="AdminSetStockStatusConfigActionGroup" stepKey="selectOutOfStock">
5668
<argument name="stockStatus" value="In Stock"/>
5769
</actionGroup>
5870
<actionGroup ref="AdminSubmitAdvancedInventoryFormActionGroup" stepKey="clickOnDoneButton"/>
5971
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickOnSaveButton"/>
60-
<see selector="{{AdminCategoryMessagesSection.SuccessMessage}}" userInput="You saved the product." stepKey="messageYouSavedTheProductIsShown"/>
72+
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="messageYouSavedTheProductIsShown">
73+
<argument name="message" value="You saved the product."/>
74+
</actionGroup>
6175
<comment userInput="Adding the comment to replace CliIndexerReindexActionGroup action group ('indexer:reindex' commands) for preserving Backward Compatibility" stepKey="reindex"/>
6276
<comment userInput="Adding the comment to replace CliCacheFlushActionGroup action group ('cache:flush' command) for preserving Backward Compatibility" stepKey="flushCache"/>
6377
<!--Verify product is visible in category front page -->
64-
<amOnPage url="$$createCategory.custom_attributes[url_key]$$.html" stepKey="openCategoryStoreFrontPage"/>
65-
<waitForPageLoad stepKey="waitForCategoryPageToLoad"/>
66-
<seeElement selector="{{StorefrontHeaderSection.NavigationCategoryByName(SimpleSubCategory.name)}}" stepKey="seeCategoryInFrontPage"/>
78+
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="openCategoryStoreFrontPage">
79+
<argument name="category" value="$createCategory$"/>
80+
</actionGroup>
81+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForCategoryPageToLoad"/>
82+
<actionGroup ref="StorefrontAssertCategoryNameIsShownInMenuActionGroup" stepKey="seeCategoryInFrontPage">
83+
<argument name="categoryName" value="{{SimpleSubCategory.name}}"/>
84+
</actionGroup>
6785
<click selector="{{StorefrontHeaderSection.NavigationCategoryByName(SimpleSubCategory.name)}}" stepKey="clickOnCategory"/>
68-
<see selector="{{StorefrontCategoryMainSection.productName}}" userInput="{{SimpleProduct.name}}" stepKey="seeProductNameInCategoryPage"/>
86+
<actionGroup ref="AssertStorefrontProductIsPresentOnCategoryPageActionGroup" stepKey="seeProductNameInCategoryPage">
87+
<argument name="productName" value="{{SimpleProduct.name}}"/>
88+
</actionGroup>
6989
<!--Verify Product In Store Front-->
70-
<amOnPage url="$$createSimpleProduct.custom_attributes[url_key]$$.html" stepKey="goToStorefrontPage"/>
71-
<waitForPageLoad stepKey="waitForProductFrontPageToLoad"/>
72-
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="{{SimpleProduct.name}}" stepKey="seeProductNameInStoreFront"/>
73-
<see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="{{SimpleProduct.price}}" stepKey="seeProductPriceInStoreFront"/>
90+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="goToStorefrontPage">
91+
<argument name="product" value="$createSimpleProduct$"/>
92+
</actionGroup>
93+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForProductFrontPageToLoad"/>
94+
<actionGroup ref="StorefrontAssertProductNameOnProductPageActionGroup" stepKey="seeProductNameInStoreFront">
95+
<argument name="productName" value="{{SimpleProduct.name}}"/>
96+
</actionGroup>
97+
<actionGroup ref="StorefrontAssertProductPriceOnProductPageActionGroup" stepKey="seeProductPriceInStoreFront">
98+
<argument name="productPrice" value="{{SimpleProduct.price}}"/>
99+
</actionGroup>
74100
<actionGroup ref="StorefrontAssertProductSkuOnProductPageActionGroup" stepKey="seeProductSkuInStoreFront">
75101
<argument name="productSku" value="{{SimpleProduct.sku}}"/>
76102
</actionGroup>
77-
<see selector="{{StorefrontProductInfoMainSection.productStockStatus}}" userInput="In Stock" stepKey="seeProductStatusInStoreFront"/>
103+
<actionGroup ref="StorefrontCheckProductStockStatus" stepKey="seeProductStatusInStoreFront">
104+
<argument name="productUrlKey" value="$$createSimpleProduct.custom_attributes[url_key]$$"/>
105+
<argument name="productName" value="$createSimpleProduct.name$"/>
106+
</actionGroup>
78107
<!--Add Product to the cart-->
79-
<fillField selector="{{StorefrontProductPageSection.qtyInput}}" userInput="1" stepKey="fillProductQuantity"/>
80-
<actionGroup ref="StorefrontClickAddToCartOnProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage"/>
81-
<seeElement selector="{{StorefrontProductPageSection.successMsg}}" stepKey="seeSuccessSaveMessage"/>
108+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="fillProductQuantity"/>
109+
<actionGroup ref="StorefrontAddProductToCartWithQtyActionGroup" stepKey="addToCartFromStorefrontProductPage">
110+
<argument name="productQty" value="1"/>
111+
</actionGroup>
112+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="seeSuccessSaveMessage"/>
82113
<seeElement selector="{{StorefrontMinicartSection.quantity(1)}}" stepKey="seeAddedProductQuantityInCart"/>
83114
<actionGroup ref="StorefrontClickOnMiniCartActionGroup" stepKey="clickOnMiniCart"/>
84-
<see selector="{{StorefrontMinicartSection.miniCartItemsText}}" userInput="{{SimpleProduct.name}}" stepKey="seeProductNameInMiniCart"/>
85-
<see selector="{{StorefrontMinicartSection.miniCartItemsText}}" userInput="{{SimpleProduct.price}}" stepKey="seeProductPriceInMiniCart"/>
86-
<seeElement selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="seeCheckOutButtonInMiniCart"/>
115+
<actionGroup ref="AssertStorefrontMiniCartItemsActionGroup" stepKey="seeProductNameInMiniCart">
116+
<argument name="productName" value="{{SimpleProduct.name}}"/>
117+
<argument name="productPrice" value="{{SimpleProduct.price}}"/>
118+
<argument name="cartSubtotal" value="{{SimpleProduct.price}}" />
119+
<argument name="qty" value="1"/>
120+
</actionGroup>
121+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="seeProductPriceInMiniCart"/>
122+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="seeCheckOutButtonInMiniCart"/>
87123
</test>
88124
</tests>

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,12 @@
118118
</actionGroup>
119119

120120
<!-- Assert related products at the storefront -->
121-
<seeElement selector="{{StorefrontProductRelatedProductsSection.relatedProductName($$createSecondRelatedProduct.name$$)}}" stepKey="seeSecondRelatedProduct"/>
122-
<seeElement selector="{{StorefrontProductRelatedProductsSection.relatedProductName($$createThirdRelatedProduct.name$$)}}" stepKey="seeThirdRelatedProduct"/>
121+
<actionGroup ref="StorefrontAssertRelatedProductOnProductPageActionGroup" stepKey="seeSecondRelatedProduct">
122+
<argument name="productName" value="$$createSecondRelatedProduct.name$$"/>
123+
</actionGroup>
124+
<actionGroup ref="StorefrontAssertRelatedProductOnProductPageActionGroup" stepKey="seeThirdRelatedProduct">
125+
<argument name="productName" value="$$createThirdRelatedProduct.name$$"/>
126+
</actionGroup>
123127

124128
<!-- Assert product design settings "Layout empty" -->
125129
<seeElement selector="{{StorefrontProductPageDesignSection.layoutEmpty}}" stepKey="seeNewDesignChanges"/>

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

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,15 @@
128128
</actionGroup>
129129

130130
<!-- Edit Content to the product -->
131-
<scrollTo selector="{{AdminProductContentSection.sectionHeader}}" x="0" y="-100" stepKey="scrollToContentTab"/>
132-
<click selector="{{AdminProductContentSection.sectionHeader}}" stepKey="openContentTab"/>
133-
<fillField selector="{{AdminProductContentSection.descriptionTextArea}}" userInput="EDIT ~ {{ApiProductDescription.value}} ~ EDIT" stepKey="editLongDescription"/>
134-
<fillField selector="{{AdminProductContentSection.shortDescriptionTextArea}}" userInput="EDIT ~ {{ApiProductShortDescription.value}} ~ EDIT" stepKey="editShortDescription"/>
131+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="scrollToContentTab"/>
132+
<actionGroup ref="AdminOpenContentSectionOnProductPageActionGroup" stepKey="openContentTab"/>
133+
<actionGroup ref="AdminFillInProductDescriptionActionGroup" stepKey="editLongDescription">
134+
<argument name="description" value="EDIT ~ {{ApiProductDescription.value}} ~ EDIT"/>
135+
</actionGroup>
136+
<actionGroup ref="AdminFillInProductShortDescriptionActionGroup" stepKey="editShortDescription">
137+
<argument name="shortDescription" value="EDIT ~ {{ApiProductShortDescription.value}} ~ EDIT"/>
138+
</actionGroup>
139+
135140

136141
<!-- Edit product Search Engine Optimization settings -->
137142
<actionGroup ref="AdminChangeProductSEOSettingsActionGroup" stepKey="editProductSEOSettings">
@@ -170,13 +175,23 @@
170175
</actionGroup>
171176

172177
<!-- Assert three related products at the storefront -->
173-
<seeElement selector="{{StorefrontProductRelatedProductsSection.relatedProductName($$createThirdRelatedProduct.name$$)}}" stepKey="seeFirstRelatedProduct"/>
174-
<seeElement selector="{{StorefrontProductRelatedProductsSection.relatedProductName($$createSecondRelatedProduct.name$$)}}" stepKey="seeSecondRelatedProduct"/>
175-
<seeElement selector="{{StorefrontProductRelatedProductsSection.relatedProductName($$createThirdRelatedProduct.name$$)}}" stepKey="seeThirdRelatedProduct"/>
178+
<actionGroup ref="StorefrontAssertRelatedProductOnProductPageActionGroup" stepKey="seeFirstRelatedProduct">
179+
<argument name="productName" value="$$createThirdRelatedProduct.name$$"/>
180+
</actionGroup>
181+
<actionGroup ref="StorefrontAssertRelatedProductOnProductPageActionGroup" stepKey="seeSecondRelatedProduct">
182+
<argument name="productName" value="$$createSecondRelatedProduct.name$$"/>
183+
</actionGroup>
184+
<actionGroup ref="StorefrontAssertRelatedProductOnProductPageActionGroup" stepKey="seeThirdRelatedProduct">
185+
<argument name="productName" value="$$createThirdRelatedProduct.name$$"/>
186+
</actionGroup>
176187

177188
<!-- Assert product content -->
178-
<see selector="{{StorefrontProductInfoMainSection.productDescription}}" userInput="EDIT ~ {{ApiProductDescription.value}} ~ EDIT" stepKey="seeEditedLongDescriptionStorefront"/>
179-
<see selector="{{StorefrontProductInfoMainSection.productShortDescription}}" userInput="EDIT ~ {{ApiProductShortDescription.value}} ~ EDIT" stepKey="seeEditedShortDescriptionStorefront"/>
189+
<actionGroup ref="AssertStorefrontProductDescriptionActionGroup" stepKey="seeEditedLongDescriptionStorefront">
190+
<argument name="productDescription" value="EDIT ~ {{ApiProductDescription.value}} ~ EDIT"/>
191+
</actionGroup>
192+
<actionGroup ref="AssertStorefrontShortProductDescriptionActionGroup" stepKey="seeEditedShortDescriptionStorefront">
193+
<argument name="productShortDescription" value="EDIT ~ {{ApiProductShortDescription.value}} ~ EDIT"/>
194+
</actionGroup>
180195

181196
<!-- Assert product design settings "right bar is present at product page with 2 columns" -->
182197
<seeElement selector="{{StorefrontProductPageDesignSection.layoutTwoColumnsRight}}" stepKey="seeNewDesignChanges"/>

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@
3636
</actionGroup>
3737

3838
<!-- Assert error message -->
39-
<see selector="{{AdminCategoryMessagesSection.errorMessage}}" userInput="The value specified in the URL Key field would generate a URL that already exists." stepKey="seeErrorMessage"/>
39+
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="seeErrorMessage">
40+
<argument name="messageType" value="error"/>
41+
<argument name="message" value="The value specified in the URL Key field would generate a URL that already exists."/>
42+
</actionGroup>
4043
</test>
4144
</tests>

0 commit comments

Comments
 (0)