Skip to content

Commit df6eb63

Browse files
committed
Merge remote-tracking branch 'origin/2.3-develop' into MC-22819
2 parents c082293 + 3009388 commit df6eb63

File tree

67 files changed

+1662
-61
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+1662
-61
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<!--
12+
NOTICE: AddSimpleProductToCart is deprecated.
13+
Please use AddSimpleProductToCartActionGroup instead.
14+
-->
1115
<actionGroup name="AddSimpleProductToCart">
1216
<annotations>
1317
<description>Navigates to the Storefront Product page. Then adds the Product to the Cart. Validates that the Success Message is present and correct.</description>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
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="AddSimpleProductToCartActionGroup">
12+
<annotations>
13+
<description>Navigates to the Storefront Product page. Then adds the Product to the Cart. Validates that the Success Message is present and correct.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="product" defaultValue="product"/>
17+
</arguments>
18+
19+
<amOnPage url="{{StorefrontProductPage.url(product.custom_attributes[url_key])}}" stepKey="goToProductPage"/>
20+
<waitForPageLoad stepKey="waitForProductPage"/>
21+
<click selector="{{StorefrontProductPageSection.addToCartBtn}}" stepKey="addToCart"/>
22+
<waitForElementNotVisible selector="{{StorefrontProductActionSection.addToCartButtonTitleIsAdding}}" stepKey="waitForElementNotVisibleAddToCartButtonTitleIsAdding"/>
23+
<waitForElementNotVisible selector="{{StorefrontProductActionSection.addToCartButtonTitleIsAdded}}" stepKey="waitForElementNotVisibleAddToCartButtonTitleIsAdded"/>
24+
<waitForElementVisible selector="{{StorefrontProductActionSection.addToCartButtonTitleIsAddToCart}}" stepKey="waitForElementVisibleAddToCartButtonTitleIsAddToCart"/>
25+
<waitForPageLoad stepKey="waitForPageLoad"/>
26+
<waitForElementVisible selector="{{StorefrontMessagesSection.success}}" time="30" stepKey="waitForProductAddedMessage"/>
27+
<see selector="{{StorefrontMessagesSection.success}}" userInput="You added {{product.name}} to your shopping cart." stepKey="seeAddToCartSuccessMessage"/>
28+
</actionGroup>
29+
</actionGroups>

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

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
<!--Navigate to create product page from product grid page-->
11+
<!--
12+
NOTICE: goToCreateProductPage is deprecated.
13+
Please use GoToCreateProductPageActionGroup instead.
14+
-->
1215
<actionGroup name="goToCreateProductPage">
1316
<annotations>
1417
<description>Clicks on the 'Add Product' toggle on the Admin Products grid page. Clicks on the provided Product (Type).</description>
@@ -25,7 +28,10 @@
2528
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Product" stepKey="seeNewProductTitle"/>
2629
</actionGroup>
2730

28-
<!--Navigate to create product page directly via ID-->
31+
<!--
32+
NOTICE: goToProductPageViaID is deprecated.
33+
Please use GoToProductPageViaIDActionGroup instead.
34+
-->
2935
<actionGroup name="goToProductPageViaID">
3036
<annotations>
3137
<description>Goes to the Product edit page for the provided Product ID.</description>
@@ -37,7 +43,10 @@
3743
<amOnPage url="{{AdminProductEditPage.url(productId)}}" stepKey="goToProduct"/>
3844
</actionGroup>
3945

40-
<!-- Fill main fields in create product form using a product entity -->
46+
<!--
47+
NOTICE: fillMainProductForm is deprecated.
48+
Please use FillMainProductFormActionGroup instead.
49+
-->
4150
<actionGroup name="fillMainProductForm">
4251
<annotations>
4352
<description>Fills in the provided Product details (Name, SKU, Price, Quantity, Stock Status, Weight Type and Weight) on the Admin Products creation/edit page.</description>
@@ -56,7 +65,10 @@
5665
<fillField selector="{{AdminProductFormSection.productWeight}}" userInput="{{product.weight}}" stepKey="fillProductWeight"/>
5766
</actionGroup>
5867

59-
<!-- Fill main fields in create product form using strings for flexibility -->
68+
<!--
69+
NOTICE: FillMainProductFormByString is deprecated.
70+
Please use FillMainProductFormByStringActionGroup instead.
71+
-->
6072
<actionGroup name="FillMainProductFormByString">
6173
<annotations>
6274
<description>Fills in the provided Product Name, SKU, Price, Quantity, Stock Status and Weight on the Admin Products creation/edit page.</description>
@@ -79,7 +91,10 @@
7991
<fillField selector="{{AdminProductFormSection.productWeight}}" userInput="{{productWeight}}" stepKey="fillProductWeight"/>
8092
</actionGroup>
8193

82-
<!--Fill main fields in create product form with no weight, useful for virtual and downloadable products -->
94+
<!--
95+
NOTICE: fillMainProductFormNoWeight is deprecated.
96+
Please use FillMainProductFormNoWeightActionGroup instead.
97+
-->
8398
<actionGroup name="fillMainProductFormNoWeight">
8499
<annotations>
85100
<description>Fills in the provided Product details (Name, SKU, Price, Quantity, Stock Status and Weight Type) on the Admin Products creation/edit page.</description>
@@ -96,7 +111,10 @@
96111
<selectOption selector="{{AdminProductFormSection.productWeightSelect}}" userInput="This item has no weight" stepKey="selectWeight"/>
97112
</actionGroup>
98113

99-
<!--Fill main fields in create product form with name and sku -->
114+
<!--
115+
NOTICE: fillProductNameAndSkuInProductForm is deprecated.
116+
Please use FillProductNameAndSkuInProductForm instead.
117+
-->
100118
<actionGroup name="fillProductNameAndSkuInProductForm">
101119
<annotations>
102120
<description>Fills in the provided Product details (Name and SKU) on the Admin Products creation and edit page.</description>
@@ -131,7 +149,10 @@
131149
<see selector="{{AdminProductFormSection.priceFieldError}}" userInput="This is a required field." stepKey="seePriceRequired"/>
132150
</actionGroup>
133151

134-
<!--Save product and see success message-->
152+
<!--
153+
NOTICE: saveProductForm is deprecated.
154+
Please use SaveProductFormActionGroup instead.
155+
-->
135156
<actionGroup name="saveProductForm">
136157
<annotations>
137158
<description>Clicks on the Save button. Validates that the Success Message is present and correct.</description>

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

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
<!--Reset the product grid to the default view-->
11+
<!--
12+
NOTICE: resetProductGridToDefaultView is deprecated.
13+
Please use ResetProductGridToDefaultViewActionGroup instead.
14+
-->
1215
<actionGroup name="resetProductGridToDefaultView">
1316
<annotations>
1417
<description>Sets the Admin Products grid view to the 'Default View'.</description>
@@ -21,7 +24,10 @@
2124
<see selector="{{AdminProductGridFilterSection.viewDropdown}}" userInput="Default View" stepKey="seeDefaultViewSelected"/>
2225
</actionGroup>
2326

24-
<!--Filter the product grid by the SKU field-->
27+
<!--
28+
NOTICE: filterProductGridBySku is deprecated.
29+
Please use FilterProductGridBySkuActionGroup instead.
30+
-->
2531
<actionGroup name="filterProductGridBySku">
2632
<annotations>
2733
<description>Filters the Admin Products grid by the provided Product (SKU).</description>
@@ -37,7 +43,10 @@
3743
<waitForElementNotVisible selector="{{AdminProductGridSection.loadingMask}}" stepKey="waitForFilteredGridLoad" time="30"/>
3844
</actionGroup>
3945

40-
<!--Filter the product grid by the SKU string -->
46+
<!--
47+
NOTICE: filterProductGridBySku2 is deprecated.
48+
Please use FilterProductGridBySku2ActionGroup instead.
49+
-->
4150
<actionGroup name="filterProductGridBySku2">
4251
<annotations>
4352
<description>Filters the Admin Products grid by the provided Product SKU.</description>
@@ -53,7 +62,10 @@
5362
<waitForElementNotVisible selector="{{AdminProductGridSection.loadingMask}}" stepKey="waitForFilteredGridLoad" time="30"/>
5463
</actionGroup>
5564

56-
<!--Filter the product grid by the Name field-->
65+
<!--
66+
NOTICE: filterProductGridByName is deprecated.
67+
Please use FilterProductGridByNameActionGroup instead.
68+
-->
5769
<actionGroup name="filterProductGridByName">
5870
<annotations>
5971
<description>Filters the Admin Products grid by the provided Product (Name).</description>
@@ -208,7 +220,10 @@
208220
<click selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="clickApplyFilters"/>
209221
</actionGroup>
210222

211-
<!--Delete a product by filtering grid and using delete action-->
223+
<!--
224+
NOTICE: deleteProductUsingProductGrid is deprecated.
225+
Please use DeleteProductUsingProductGridActionGroup instead.
226+
-->
212227
<actionGroup name="deleteProductUsingProductGrid">
213228
<annotations>
214229
<description>Deletes the provided Product from the Admin Products grid page.</description>
@@ -246,7 +261,10 @@
246261
<remove keyForRemoval="seeProductSkuInGrid"/>
247262
</actionGroup>
248263

249-
<!--Delete a product by filtering grid and using delete action-->
264+
<!--
265+
NOTICE: deleteProductBySku is deprecated.
266+
Please use DeleteProductBySkuActionGroup instead.
267+
-->
250268
<actionGroup name="deleteProductBySku">
251269
<annotations>
252270
<description>Goes to the Admin Products grid page. Deletes the provided Product SKU.</description>

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

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,27 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AssertProductInStorefrontProductPageActionGroup">
12+
<annotations>
13+
<description>Goes to the Storefront page. Validates that the provided Product details are present.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="product"/>
17+
</arguments>
18+
19+
<!-- Go to storefront product page, assert product name, sku and price -->
20+
<amOnPage url="{{product.urlKey}}.html" stepKey="navigateToProductPage"/>
21+
<waitForPageLoad stepKey="waitForPageLoad2"/>
22+
<seeInTitle userInput="{{product.name}}" stepKey="assertProductNameTitle"/>
23+
<see userInput="{{product.name}}" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="assertProductName"/>
24+
<see userInput="{{product.price}}" selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="assertProductPrice"/>
25+
<see userInput="{{product.sku}}" selector="{{StorefrontProductInfoMainSection.productSku}}" stepKey="assertProductSku"/>
26+
</actionGroup>
27+
28+
<!--
29+
NOTICE: AssertProductInStorefrontProductPage is deprecated.
30+
Please use AssertProductInStorefrontProductPageActionGroup instead.
31+
-->
1132
<actionGroup name="AssertProductInStorefrontProductPage">
1233
<annotations>
1334
<description>Goes to the Storefront page. Validates that the provided Product details are present.</description>
@@ -25,6 +46,10 @@
2546
<see userInput="{{product.sku}}" selector="{{StorefrontProductInfoMainSection.productSku}}" stepKey="assertProductSku"/>
2647
</actionGroup>
2748

49+
<!--
50+
NOTICE: AssertProductNameAndSkuInStorefrontProductPage is deprecated.
51+
Please use AssertProductNameAndSkuInStorefrontProductPageActionGroup instead.
52+
-->
2853
<actionGroup name="AssertProductNameAndSkuInStorefrontProductPage">
2954
<annotations>
3055
<description>Goes to the Storefront Product page for the provided Product. Validates that the Product details are present and correct.</description>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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="AssertProductNameAndSkuInStorefrontProductPageActionGroup">
12+
<annotations>
13+
<description>Goes to the Storefront Product page for the provided Product. Validates that the Product details are present and correct.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="product"/>
17+
</arguments>
18+
19+
<!-- Go to storefront product page, assert product name and sku -->
20+
<amOnPage url="{{product.urlKey}}.html" stepKey="navigateToProductPage"/>
21+
<waitForPageLoad stepKey="waitForPageLoad2"/>
22+
<seeInTitle userInput="{{product.name}}" stepKey="assertProductNameTitle"/>
23+
<see userInput="{{product.name}}" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="assertProductName"/>
24+
<see userInput="{{product.sku}}" selector="{{StorefrontProductInfoMainSection.productSku}}" stepKey="assertProductSku"/>
25+
</actionGroup>
26+
</actionGroups>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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="DeleteProductBySkuActionGroup">
12+
<annotations>
13+
<description>Goes to the Admin Products grid page. Deletes the provided Product SKU.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="sku" type="string"/>
17+
</arguments>
18+
19+
<!--TODO use other action group for filtering grid when MQE-539 is implemented -->
20+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage"/>
21+
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/>
22+
<click selector="{{AdminProductGridFilterSection.filters}}" stepKey="openProductFilters"/>
23+
<fillField selector="{{AdminProductGridFilterSection.skuFilter}}" userInput="{{sku}}" stepKey="fillProductSkuFilter"/>
24+
<click selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="clickApplyFilters"/>
25+
<see selector="{{AdminProductGridSection.productGridCell('1', 'SKU')}}" userInput="{{sku}}" stepKey="seeProductSkuInGrid"/>
26+
<click selector="{{AdminProductGridSection.multicheckDropdown}}" stepKey="openMulticheckDropdown"/>
27+
<click selector="{{AdminProductGridSection.multicheckOption('Select All')}}" stepKey="selectAllProductInFilteredGrid"/>
28+
<click selector="{{AdminProductGridSection.bulkActionDropdown}}" stepKey="clickActionDropdown"/>
29+
<click selector="{{AdminProductGridSection.bulkActionOption('Delete')}}" stepKey="clickDeleteAction"/>
30+
<waitForElementVisible selector="{{AdminConfirmationModalSection.ok}}" stepKey="waitForConfirmModal"/>
31+
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="confirmProductDelete"/>
32+
<see selector="{{AdminMessagesSection.success}}" userInput="record(s) have been deleted." stepKey="seeSuccessMessage"/>
33+
</actionGroup>
34+
</actionGroups>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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="DeleteProductUsingProductGridActionGroup">
12+
<annotations>
13+
<description>Deletes the provided Product from the Admin Products grid page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="product"/>
17+
</arguments>
18+
19+
<!--TODO use other action group for filtering grid when MQE-539 is implemented -->
20+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="visitAdminProductPage"/>
21+
<waitForPageLoad time="60" stepKey="waitForPageLoadInitial"/>
22+
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFiltersInitial"/>
23+
<click selector="{{AdminProductGridFilterSection.filters}}" stepKey="openProductFilters"/>
24+
<fillField selector="{{AdminProductGridFilterSection.skuFilter}}" userInput="{{product.sku}}" stepKey="fillProductSkuFilter"/>
25+
<fillField selector="{{AdminProductGridFilterSection.nameFilter}}" userInput="{{product.name}}" stepKey="fillProductNameFilter"/>
26+
<click selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="clickApplyFilters"/>
27+
<see selector="{{AdminProductGridSection.productGridCell('1', 'SKU')}}" userInput="{{product.sku}}" stepKey="seeProductSkuInGrid"/>
28+
<click selector="{{AdminProductGridSection.multicheckDropdown}}" stepKey="openMulticheckDropdown"/>
29+
<click selector="{{AdminProductGridSection.multicheckOption('Select All')}}" stepKey="selectAllProductInFilteredGrid"/>
30+
<click selector="{{AdminProductGridSection.bulkActionDropdown}}" stepKey="clickActionDropdown"/>
31+
<click selector="{{AdminProductGridSection.bulkActionOption('Delete')}}" stepKey="clickDeleteAction"/>
32+
<waitForElementVisible selector="{{AdminProductGridConfirmActionSection.title}}" stepKey="waitForConfirmModal"/>
33+
<click selector="{{AdminProductGridConfirmActionSection.ok}}" stepKey="confirmProductDelete"/>
34+
</actionGroup>
35+
</actionGroups>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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="FillMainProductFormActionGroup">
12+
<annotations>
13+
<description>Fills in the provided Product details (Name, SKU, Price, Quantity, Stock Status, Weight Type and Weight) on the Admin Products creation/edit page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="product" defaultValue="_defaultProduct"/>
17+
</arguments>
18+
19+
<scrollToTopOfPage stepKey="scrollToTopOfPage"/>
20+
<fillField selector="{{AdminProductFormSection.productName}}" userInput="{{product.name}}" stepKey="fillProductName"/>
21+
<fillField selector="{{AdminProductFormSection.productSku}}" userInput="{{product.sku}}" stepKey="fillProductSku"/>
22+
<fillField selector="{{AdminProductFormSection.productPrice}}" userInput="{{product.price}}" stepKey="fillProductPrice"/>
23+
<fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="{{product.quantity}}" stepKey="fillProductQty"/>
24+
<selectOption selector="{{AdminProductFormSection.productStockStatus}}" userInput="{{product.status}}" stepKey="selectStockStatus"/>
25+
<selectOption selector="{{AdminProductFormSection.productWeightSelect}}" userInput="This item has weight" stepKey="selectWeight"/>
26+
<fillField selector="{{AdminProductFormSection.productWeight}}" userInput="{{product.weight}}" stepKey="fillProductWeight"/>
27+
</actionGroup>
28+
</actionGroups>

0 commit comments

Comments
 (0)