Skip to content

Commit ab815b5

Browse files
authored
🔃 [Magento Community Engineering] Community Contributions - 2.4-develop latest changes
Accepted Community Pull Requests: - #33214: Replace repetitive actions with Action Groups in StorefrontProductNameWithHTMLEntitiesTest (by @kate-kyzyma) - #33787: Updated Switzerland regions (by @sergiy-v) - #32937: Support S3 compatible storage (by @gaelreyrol) - #33662: [MFTF] Updating with AdminClickUpdateChangesOnCreateOrderPageActionGroup (by @AnnaAPak) - #33661: [ReadMe] updated readMe file for EavGraphQl-EncryptionKey modules (by @korovitskyi) - #33658: Fixed invalid method call (by @Bartlomiejsz) - #33172: Update AddDataForIndia.php (by @manavluhar) - #33218: Replace repetitive actions with Action groups in StorefrontInactiveCatalogRuleTest (by @kate-kyzyma) - #32226: [MFTF] Coverage for the 30256 Unexpected unchecking of "Append Comments" check-box issue (by @AnnaAPak) - #33232: MFTF: Allow shipment update emails to be disabled (by @kate-kyzyma) - #33166: Allow shipment update emails to be disabled (by @kassner) - #32139: Replace repetitive actions with Action Groups in StorefrontConfigurableProductCantAddToCartTest (by @kate-kyzyma) - #32133: Replace repetitive actions with Action Groups in StorefrontConfigurableProductOptionsTest (by @kate-kyzyma) - #32117: Replace repetitive actions with Action Groups in StorefrontConfigurableProductCanAddToCartTest (by @kate-kyzyma) - #32112: Replace repetitive actions with AdminCreateConfigurableProductWithDisabledChildrenProductsTest (by @kate-kyzyma) Fixed GitHub Issues: - #33806: [Issue] Replace repetitive actions with Action Groups in StorefrontProductNameWithHTMLEntitiesTest (reported by @m2-assistant[bot]) has been fixed in #33214 by @kate-kyzyma in 2.4-develop branch Related commits: 1. 92eb21c 2. b145391 3. 5a6e82b 4. eb03518 - #32553: Use English consistently for the Swiss regions names (reported by @kassner) has been fixed in #33787 by @sergiy-v in 2.4-develop branch Related commits: 1. d9653bd - #32602: [Issue] Use English consistently for the Swiss regions names (reported by @m2-assistant[bot]) has been fixed in #33787 by @sergiy-v in 2.4-develop branch Related commits: 1. d9653bd - #32114: Support S3 Compatible Storage (reported by @griffithg) has been fixed in #32937 by @gaelreyrol in 2.4-develop branch Related commits: 1. eacd297 - #33689: [Issue] [MFTF] Updating with AdminClickUpdateChangesOnCreateOrderPageActionGroup (reported by @m2-assistant[bot]) has been fixed in #33662 by @AnnaAPak in 2.4-develop branch Related commits: 1. 38930f8 - #4451: Fix for admin shipment, creditmemo, invoice pdf emulation (reported by @ksz2013) has been fixed in #33661 by @korovitskyi in 2.4-develop branch Related commits: 1. dda5316 2. 9217d8d 3. 6cd9a4d - #33698: [Issue] Update AddDataForIndia.php (reported by @m2-assistant[bot]) has been fixed in #33172 by @manavluhar in 2.4-develop branch Related commits: 1. 1f8393b - #33556: [Issue] Replace repetitive actions with Action groups in StorefrontInactiveCatalogRuleTest (reported by @m2-assistant[bot]) has been fixed in #33218 by @kate-kyzyma in 2.4-develop branch Related commits: 1. 79481f5 - #30256: Unexpected unchecking of "Append Comments" check-box (reported by @magento-engcom-team) has been fixed in #32226 by @AnnaAPak in 2.4-develop branch Related commits: 1. 24fb08b 2. fc4e310 3. 0201396 4. 77bb71e 5. 1f258dc 6. c0adb56 7. e712a14 8. 25637d6 - #32381: [Issue] WIP [MFTF] Coverage for the 30256 Unexpected unchecking of "Append Comments" check-box issue (reported by @m2-assistant[bot]) has been fixed in #32226 by @AnnaAPak in 2.4-develop branch Related commits: 1. 24fb08b 2. fc4e310 3. 0201396 4. 77bb71e 5. 1f258dc 6. c0adb56 7. e712a14 8. 25637d6 - #33165: Cannot disable shipment update emails (reported by @kassner) has been fixed in #33232 by @kate-kyzyma in 2.4-develop branch Related commits: 1. 1b48348 2. 9408b16 - #33165: Cannot disable shipment update emails (reported by @kassner) has been fixed in #33166 by @kassner in 2.4-develop branch Related commits: 1. a48e3ab - #33786: [Issue] Replace repetitive actions with Action Groups in StorefrontConfigurableProductCantAddToCartTest (reported by @m2-assistant[bot]) has been fixed in #32139 by @kate-kyzyma in 2.4-develop branch Related commits: 1. 4cf3922 2. 6010ead 3. c316814 - #33785: [Issue] Replace repetitive actions with Action Groups in StorefrontConfigurableProductOptionsTest (reported by @m2-assistant[bot]) has been fixed in #32133 by @kate-kyzyma in 2.4-develop branch Related commits: 1. 6fb3cff 2. abb0c86 3. 3efbaa8 - #33784: [Issue] Replace repetitive actions with Action Groups in StorefrontConfigurableProductCanAddToCartTest (reported by @m2-assistant[bot]) has been fixed in #32117 by @kate-kyzyma in 2.4-develop branch Related commits: 1. 6cfe41b 2. e1f4633 3. d9b081f 4. 2c382dc - #33775: [Issue] Replace repetitive actions with AdminCreateConfigurableProductWithDisabledChildrenProductsTest (reported by @m2-assistant[bot]) has been fixed in #32112 by @kate-kyzyma in 2.4-develop branch Related commits: 1. 16f7139 2. a73d9a1 3. 25c11ef 4. fcae06e 5. 4bc53fd
2 parents 21aa619 + 2670c4b commit ab815b5

File tree

45 files changed

+829
-84
lines changed

Some content is hidden

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

45 files changed

+829
-84
lines changed

app/code/Magento/AwsS3/Driver/AwsS3Factory.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,10 @@ public function createConfigured(
116116
$config['http_handler'] = $this->objectManager->create($config['http_handler'])($config);
117117
}
118118

119+
if (!empty($config['path_style'])) {
120+
$config['use_path_style_endpoint'] = boolval($config['path_style']);
121+
}
122+
119123
$client = new S3Client($config);
120124
$adapter = new AwsS3V3Adapter($client, $config['bucket'], $prefix);
121125
$cache = $this->cacheInterfaceFactory->create(

app/code/Magento/AwsS3/Model/Config.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414
*/
1515
class Config
1616
{
17+
public const PATH_ENDPOINT = 'remote_storage/endpoint';
1718
public const PATH_REGION = 'remote_storage/region';
1819
public const PATH_BUCKET = 'remote_storage/bucket';
1920
public const PATH_ACCESS_KEY = 'remote_storage/access_key';
2021
public const PATH_SECRET_KEY = 'remote_storage/secret_key';
2122
public const PATH_PREFIX = 'remote_storage/prefix';
23+
public const PATH_PATH_STYLE = 'remote_storage/path_style';
2224

2325
/**
2426
* @var DeploymentConfig
@@ -33,6 +35,16 @@ public function __construct(DeploymentConfig $config)
3335
$this->config = $config;
3436
}
3537

38+
/**
39+
* Retrieves endpoint.
40+
*
41+
* @return string
42+
*/
43+
public function getEndpoint(): string
44+
{
45+
return (string)$this->config->get(self::PATH_ENDPOINT);
46+
}
47+
3648
/**
3749
* Retrieves region.
3850
*
@@ -82,4 +94,14 @@ public function getPrefix(): string
8294
{
8395
return (string)$this->config->get(self::PATH_PREFIX, '');
8496
}
97+
98+
/**
99+
* Retrieves endpoint.
100+
*
101+
* @return string
102+
*/
103+
public function getPathStyle(): string
104+
{
105+
return (string)$this->config->get(self::PATH_PATH_STYLE, '0');
106+
}
85107
}
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="AssertStorefrontBreadcrubmsAreShownActionGroup">
12+
<arguments>
13+
<argument name="breadcrumbs" type="string"/>
14+
</arguments>
15+
<see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="{{breadcrumbs}}" stepKey="seeBreadcrumbsOnPage"/>
16+
</actionGroup>
17+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Test/StorefrontProductNameWithDoubleQuoteTest/StorefrontProductNameWithHTMLEntitiesTest.xml

Lines changed: 46 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,37 +36,63 @@
3636
<comment userInput="Adding the comment to replace CliIndexerReindexActionGroup action group ('indexer:reindex' commands) for preserving Backward Compatibility" stepKey="reindex"/>
3737

3838
<!--Check product in category listing-->
39-
<amOnPage url="{{StorefrontCategoryPage.url($$createCategoryOne.custom_attributes[url_key]$$)}}" stepKey="navigateToCategoryPage"/>
40-
<waitForPageLoad stepKey="waitforCategoryPageToLoad"/>
41-
<see selector="{{StorefrontCategoryProductSection.ProductTitleByName(productWithHTMLEntityOne.name)}}" userInput="{{productWithHTMLEntityOne.name}}" stepKey="seeCorrectNameProd1CategoryPage"/>
42-
<see selector="{{StorefrontCategoryProductSection.ProductTitleByName(productWithHTMLEntityTwo.name)}}" userInput="{{productWithHTMLEntityTwo.name}}" stepKey="seeCorrectNameProd2CategoryPage"/>
39+
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="navigateToCategoryPage">
40+
<argument name="category" value="$$createCategoryOne$$"/>
41+
</actionGroup>
42+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitforCategoryPageToLoad"/>
43+
<actionGroup ref="AssertStorefrontProductIsPresentOnCategoryPageActionGroup" stepKey="seeCorrectNameProd1CategoryPage">
44+
<argument name="productName" value="{{productWithHTMLEntityOne.name}}"/>
45+
</actionGroup>
46+
<actionGroup ref="AssertStorefrontProductIsPresentOnCategoryPageActionGroup" stepKey="seeCorrectNameProd2CategoryPage">
47+
<argument name="productName" value="{{productWithHTMLEntityTwo.name}}"/>
48+
</actionGroup>
4349

4450
<!--Open product display page-->
45-
<click selector="{{StorefrontCategoryProductSection.ProductTitleByName(productWithHTMLEntityOne.name)}}" stepKey="clickProductToGoProductPage"/>
46-
<waitForPageLoad stepKey="waitForProductDisplayPageLoad2"/>
47-
48-
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="{{productWithHTMLEntityOne.name}}" stepKey="seeCorrectName"/>
51+
<actionGroup ref="StorefrontOpenProductFromCategoryPageActionGroup" stepKey="clickProductToGoProductPage">
52+
<argument name="productName" value="{{productWithHTMLEntityOne.name}}"/>
53+
</actionGroup>
54+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForProductDisplayPageLoad2"/>
55+
<actionGroup ref="StorefrontAssertProductNameOnProductPageActionGroup" stepKey="seeCorrectName">
56+
<argument name="productName" value="{{productWithHTMLEntityOne.name}}"/>
57+
</actionGroup>
4958
<actionGroup ref="StorefrontAssertProductSkuOnProductPageActionGroup" stepKey="seeCorrectSku">
5059
<argument name="productSku" value="{{productWithHTMLEntityOne.sku}}"/>
5160
</actionGroup>
52-
<see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="${{productWithHTMLEntityOne.price}}" stepKey="seeCorrectPrice"/>
61+
<actionGroup ref="StorefrontAssertProductPriceOnProductPageActionGroup" stepKey="seeCorrectPrice">
62+
<argument name="productPrice" value="{{productWithHTMLEntityOne.price}}"/>
63+
</actionGroup>
5364

5465
<!--Veriy the breadcrumbs on Product Display page-->
55-
<see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="Home" stepKey="seeHomePageInBreadcrumbs1"/>
56-
<see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="$$createCategoryOne.name$$" stepKey="seeCorrectBreadCrumbCategory"/>
57-
<see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="$$productOne.name$$" stepKey="seeCorrectBreadCrumbProduct"/>
66+
<actionGroup ref="AssertStorefrontBreadcrubmsAreShownActionGroup" stepKey="seeHomePageInBreadcrumbs1">
67+
<argument name="breadcrumbs" value="Home"/>
68+
</actionGroup>
69+
<actionGroup ref="AssertStorefrontBreadcrubmsAreShownActionGroup" stepKey="seeCorrectBreadCrumbCategory">
70+
<argument name="breadcrumbs" value="$$createCategoryOne.name$$"/>
71+
</actionGroup>
72+
<actionGroup ref="AssertStorefrontBreadcrubmsAreShownActionGroup" stepKey="seeCorrectBreadCrumbProduct">
73+
<argument name="breadcrumbs" value="$$productOne.name$$"/>
74+
</actionGroup>
5875

59-
<click selector="{{StorefrontNavigationSection.topCategory($$createCategoryOne.name$$)}}" stepKey="goBackToCategoryPage"/>
60-
<waitForPageLoad stepKey="waitforCategoryPageToLoad2"/>
76+
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="goBackToCategoryPage">
77+
<argument name="category" value="$createCategoryOne$"/>
78+
</actionGroup>
79+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitforCategoryPageToLoad2"/>
6180

6281
<!--Open product display page-->
63-
<click selector="{{StorefrontCategoryProductSection.ProductTitleByName(productWithHTMLEntityTwo.name)}}" stepKey="clickProductToGoSecondProductPage"/>
64-
<waitForPageLoad stepKey="waitForProductDisplayPageLoad3"/>
82+
<actionGroup ref="StorefrontOpenProductFromCategoryPageActionGroup" stepKey="clickProductToGoSecondProductPage">
83+
<argument name="productName" value="{{productWithHTMLEntityTwo.name}}"/>
84+
</actionGroup>
85+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForProductDisplayPageLoad3"/>
6586

6687
<!--Verify the breadcrumbs on Product Display page-->
67-
<see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="Home" stepKey="seeHomePageInBreadcrumbs2"/>
68-
<see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="$$createCategoryOne.name$$" stepKey="seeCorrectBreadCrumbCategory2"/>
69-
<see selector="{{StorefrontNavigationSection.breadcrumbs}}" userInput="$$productTwo.name$$" stepKey="seeCorrectBreadCrumbProduct2"/>
70-
88+
<actionGroup ref="AssertStorefrontBreadcrubmsAreShownActionGroup" stepKey="seeHomePageInBreadcrumbs2">
89+
<argument name="breadcrumbs" value="Home"/>
90+
</actionGroup>
91+
<actionGroup ref="AssertStorefrontBreadcrubmsAreShownActionGroup" stepKey="seeCorrectBreadCrumbCategory2">
92+
<argument name="breadcrumbs" value="$$createCategoryOne.name$$"/>
93+
</actionGroup>
94+
<actionGroup ref="AssertStorefrontBreadcrubmsAreShownActionGroup" stepKey="seeCorrectBreadCrumbProduct2">
95+
<argument name="breadcrumbs" value="$$productTwo.name$$"/>
96+
</actionGroup>
7197
</test>
7298
</tests>

app/code/Magento/CatalogRule/Test/Mftf/Test/StorefrontInactiveCatalogRuleTest.xml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,32 @@
4646
</after>
4747

4848
<!-- Verify price is not discounted on category page -->
49-
<amOnPage url="{{StorefrontCategoryPage.url($createCategory.custom_attributes[url_key]$)}}" stepKey="openCategoryPageOnFrontend"/>
50-
<waitForPageLoad stepKey="waitForCategoryPageLoaded"/>
51-
<see selector="{{StorefrontCategoryProductSection.ProductPriceByNumber('1')}}" userInput="$$createProduct.price$$" stepKey="seeProductPriceOnCategoryPage"/>
49+
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="openCategoryPageOnFrontend">
50+
<argument name="category" value="$$createCategory$$"/>
51+
</actionGroup>
52+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForCategoryPageLoaded"/>
53+
<actionGroup ref="StorefrontAssertProductPriceOnCategoryPageActionGroup" stepKey="seeProductPriceOnCategoryPage">
54+
<argument name="productName" value="$$createProduct.name$$"/>
55+
<argument name="productPrice" value="$$createProduct.price$$"/>
56+
</actionGroup>
5257

5358
<!-- Verify price is not discounted on the product page -->
54-
<amOnPage url="{{StorefrontProductPage.url($createProduct.custom_attributes[url_key]$)}}" stepKey="openProductPageOnFrontend"/>
55-
<waitForPageLoad stepKey="waitForProductPageLoaded"/>
56-
<see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="$createProduct.price$" stepKey="seePriceOnProductPage"/>
59+
<actionGroup ref="StorefrontOpenProductEntityPageActionGroup" stepKey="openProductPageOnFrontend">
60+
<argument name="product" value="$createProduct$"/>
61+
</actionGroup>
62+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForProductPageLoaded"/>
63+
<actionGroup ref="StorefrontAssertProductPriceOnProductPageActionGroup" stepKey="seePriceOnProductPage">
64+
<argument name="productPrice" value="$createProduct.price$"/>
65+
</actionGroup>
5766

5867
<!-- Verify price is not discounted in the cart -->
5968
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addToCartFromStorefrontProductPage">
6069
<argument name="productName" value="$createProduct.name$"/>
6170
</actionGroup>
6271
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="openCartPage" />
6372
<waitForElementVisible selector="{{CheckoutCartSummarySection.subtotal}}" stepKey="waitForSubtotalAppears"/>
64-
<see selector="{{CheckoutCartSummarySection.subtotal}}" userInput="$createProduct.price$" stepKey="seeProductPriceOnCartPage"/>
73+
<actionGroup ref="AssertStorefrontCheckoutPaymentSummarySubtotalActionGroup" stepKey="seeProductPriceOnCartPage">
74+
<argument name="orderSubtotal" value="$createProduct.price$"/>
75+
</actionGroup>
6576
</test>
6677
</tests>
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="AssertStorefrontRequiredFieldErrorMessageForProductOptionActionGroup">
12+
<see selector="{{StorefrontProductInfoMainSection.productAttributeOptionsError}}" userInput="This is a required field"
13+
stepKey="seeErrorMessage"/>
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="StorefrontClickAddToCartButtonOnProductPageActionGroup" extends="StorefrontClickAddToCartOnProductPageActionGroup">
12+
<annotations>
13+
<description>EXTENDS: StorefrontClickAddToCartOnProductPageActionGroup. Removes 'waitForSuccessMessage'.</description>
14+
</annotations>
15+
<remove keyForRemoval="waitForSuccessMessage"/>
16+
</actionGroup>
17+
</actionGroups>

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

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -110,13 +110,20 @@
110110
<comment userInput="Adding the comment to replace CliCacheFlushActionGroup action group ('cache:flush' command) for preserving Backward Compatibility" stepKey="flushCache"/>
111111

112112
<!-- Assert configurable product is not present in category -->
113-
<amOnPage url="$$createCategory.custom_attributes[url_key]$$.html" stepKey="amOnCategoryPage"/>
114-
<waitForPageLoad stepKey="waitForCategoryPageLoad"/>
115-
<see selector="{{StorefrontCategoryMainSection.emptyProductMessage}}" userInput="We can't find products matching the selection." stepKey="seeEmptyProductMessage"/>
113+
<actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="amOnCategoryPage">
114+
<argument name="category" value="$createCategory$"/>
115+
</actionGroup>
116+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForCategoryPageLoad"/>
117+
<actionGroup ref="AssertStorefrontNoProductsFoundActionGroup" stepKey="seeEmptyProductMessage"/>
118+
116119

117120
<!-- Assert configurable product is out of stock-->
118-
<amOnPage url="{{ApiConfigurableProduct.urlKey}}.html" stepKey="amOnProductPage"/>
119-
<waitForPageLoad stepKey="waitForPageLoad"/>
120-
<see stepKey="checkForOutOfStock" selector="{{StorefrontProductInfoMainSection.stockIndication}}" userInput="OUT OF STOCK"/>
121+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="amOnProductPage"/>
122+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForPageLoad"/>
123+
<actionGroup ref="StorefrontCheckProductStockStatus" stepKey="checkForOutOfStock">
124+
<argument name="productUrlKey" value="{{ApiConfigurableProduct.urlKey}}"/>
125+
<argument name="productName" value="{{ApiConfigurableProduct.name}}"/>
126+
<argument name="stockStatus" value="Out of stock"/>
127+
</actionGroup>
121128
</test>
122129
</tests>

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest/StorefrontConfigurableProductCanAddToCartTest.xml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,17 @@
4747
</after>
4848

4949
<!-- Verify adding configurable product to cart after an option is selected in storefront product view -->
50-
<amOnPage url="{{_defaultProduct.urlKey}}.html" stepKey="amOnConfigurableProductPage"/>
51-
<waitForPageLoad stepKey="wait"/>
52-
<see userInput="{{_defaultProduct.name}}" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="seeProductName"/>
53-
<selectOption userInput="{{colorProductAttribute1.name}}" selector="{{StorefrontProductInfoMainSection.productAttributeOptionsSelectButton}}" stepKey="selectOption1"/>
50+
<actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="amOnConfigurableProductPage">
51+
<argument name="productUrlKey" value="{{_defaultProduct.urlKey}}"/>
52+
</actionGroup>
53+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="wait"/>
54+
<actionGroup ref="StorefrontAssertProductNameOnProductPageActionGroup" stepKey="seeProductName">
55+
<argument name="productName" value="{{_defaultProduct.name}}"/>
56+
</actionGroup>
57+
<actionGroup ref="StorefrontProductPageSelectDropDownOptionValueActionGroup" stepKey="selectOption1">
58+
<argument name="attributeLabel" value="{{colorProductAttribute.default_label}}"/>
59+
<argument name="optionLabel" value="{{colorProductAttribute1.name}}"/>
60+
</actionGroup>
5461
<waitForElementVisible selector="{{StorefrontProductInfoMainSection.AddToCart}}" stepKey="waitForAddToCartVisible"/>
5562
<actionGroup ref="StorefrontAddProductToCartActionGroup" stepKey="addProductToCart">
5663
<argument name="product" value="_defaultProduct"/>

app/code/Magento/ConfigurableProduct/Test/Mftf/Test/StorefrontConfigurableProductDetailsTest/StorefrontConfigurableProductCantAddToCartTest.xml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,15 @@
4747
</after>
4848

4949
<!-- Verify not able to add configurable product to cart when no option is selected in storefront product view -->
50-
<amOnPage url="{{_defaultProduct.urlKey}}.html" stepKey="amOnConfigurableProductPage"/>
51-
<waitForPageLoad stepKey="wait"/>
52-
<see userInput="{{_defaultProduct.name}}" selector="{{StorefrontProductInfoMainSection.productName}}" stepKey="seeProductName"/>
50+
<actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="amOnConfigurableProductPage">
51+
<argument name="productUrlKey" value="{{_defaultProduct.urlKey}}"/>
52+
</actionGroup>
53+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="wait"/>
54+
<actionGroup ref="StorefrontAssertProductNameOnProductPageActionGroup" stepKey="seeProductName">
55+
<argument name="productName" value="{{_defaultProduct.name}}"/>
56+
</actionGroup>
5357
<waitForElementVisible selector="{{StorefrontProductInfoMainSection.AddToCart}}" stepKey="waitForAddToCartVisible"/>
54-
<click selector="{{StorefrontProductInfoMainSection.AddToCart}}" stepKey="clickAddToCart"/>
55-
<see userInput="This is a required field" selector="{{StorefrontProductInfoMainSection.productAttributeOptionsError}}" stepKey="seeError"/>
58+
<actionGroup ref="StorefrontClickAddToCartButtonOnProductPageActionGroup" stepKey="clickAddToCart"/>
59+
<actionGroup ref="AssertStorefrontRequiredFieldErrorMessageForProductOptionActionGroup" stepKey="seeError"/>
5660
</test>
5761
</tests>

0 commit comments

Comments
 (0)