Skip to content

Commit 08a6edc

Browse files
Merge branch '2.4-develop' into ref-AdminApplyTierPriceToProductWithPercentageDiscountTest
2 parents f9445cc + b941603 commit 08a6edc

File tree

85 files changed

+2596
-366
lines changed

Some content is hidden

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

85 files changed

+2596
-366
lines changed

app/code/Magento/Backend/Test/Mftf/Test/AdminExpireCustomerSessionTest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
<after>
2323
<!-- 6. Restore default configuration settings. -->
2424
<magentoCLI command="config:set {{DefaultWebCookieLifetimeConfigData.path}} {{DefaultWebCookieLifetimeConfigData.value}}" stepKey="setDefaultCookieLifetime"/>
25+
<!-- Customer Log Out -->
26+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/>
2527
<!-- Delete data -->
2628
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
2729
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="AdminCheckNameToggleOnProductsMassAttributesUpdateActionGroup">
12+
<annotations>
13+
<description>Click the "Change" checkbox for the "Name" field on the Products Masss Attributes Update page.</description>
14+
</annotations>
15+
16+
<click selector="{{AdminEditProductAttributesSection.ChangeAttributeNameToggle}}" stepKey="toggleToChangeName"/>
17+
18+
</actionGroup>
19+
</actionGroups>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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="AdminCheckProductOnProductGridActionGroup">
12+
<annotations>
13+
<description>Check the checkbox for the product on the Product Grid</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="product" type="entity"/>
17+
</arguments>
18+
19+
<checkOption selector="{{AdminProductGridSection.productRowCheckboxBySku(product.sku)}}" stepKey="selectProduct"/>
20+
21+
</actionGroup>
22+
</actionGroups>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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="AdminClickSaveOnProductsMassAttributesUpdateActionGroup">
12+
<annotations>
13+
<description>Clicks on 'Save' button on products mass attributes update page.</description>
14+
</annotations>
15+
16+
<click selector="{{AdminEditProductAttributesSection.Save}}" stepKey="save"/>
17+
<waitForPageLoad stepKey="waitForUpdateAttributesPage"/>
18+
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="Update Attributes" stepKey="seeUpdateAttributesTitle"/>
19+
</actionGroup>
20+
</actionGroups>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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="AdminSetStockStatusActionGroup">
12+
<annotations>
13+
<description>Set Stock Status of product.</description>
14+
</annotations>
15+
16+
<arguments>
17+
<argument name="stockStatus" type="string" defaultValue="In Stock"/>
18+
</arguments>
19+
20+
<selectOption selector="{{AdminProductFormSection.productStockStatus}}" userInput="{{stockStatus}}" stepKey="setStockStatus"/>
21+
22+
</actionGroup>
23+
</actionGroups>

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@
2020

2121
<scrollTo selector="{{AdminProductFormSection.productQuantity}}" stepKey="scrollToProductQuantity" after="waitForProductPageToLoad"/>
2222
<remove keyForRemoval="disableProduct"/>
23-
<selectOption selector="{{AdminProductFormSection.productStockStatus}}" userInput="Out of Stock" stepKey="selectOutOfStock" after="scrollToProductQuantity"/>
23+
<actionGroup ref="AdminSetStockStatusActionGroup" stepKey="selectOutOfStock" after="scrollToProductQuantity">
24+
<argument name="stockStatus" value="Out of Stock"/>
25+
</actionGroup>
26+
2427
</test>
2528
</tests>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@
5353
<waitForPageLoad stepKey="waitForProductToLoad"/>
5454

5555
<fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="100" stepKey="fillProductQty"/>
56-
<selectOption selector="{{AdminProductFormSection.productStockStatus}}" userInput="In Stock" stepKey="selectStockStatus"/>
56+
<actionGroup ref="AdminSetStockStatusActionGroup" stepKey="selectStockStatus">
57+
<argument name="stockStatus" value="In Stock"/>
58+
</actionGroup>
5759

5860
<!-- Create New Product Attribute -->
5961
<click selector="{{AdminProductFormSection.addAttributeBtn}}" stepKey="clickOnAddAttribute"/>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@
5050
<waitForPageLoad stepKey="waitForProductToLoad"/>
5151

5252
<fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="100" stepKey="fillProductQty"/>
53-
<selectOption selector="{{AdminProductFormSection.productStockStatus}}" userInput="In Stock" stepKey="selectStockStatus"/>
53+
<actionGroup ref="AdminSetStockStatusActionGroup" stepKey="selectStockStatus">
54+
<argument name="stockStatus" value="In Stock"/>
55+
</actionGroup>
5456

5557
<!-- Create Product Attribute -->
5658
<click selector="{{AdminProductFormSection.addAttributeBtn}}" stepKey="clickOnAddAttribute"/>

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

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,20 +36,27 @@
3636
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
3737
</after>
3838

39-
<!-- Search and select products -->
4039
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="navigateToProductIndex"/>
4140
<actionGroup ref="SearchProductGridByKeyword2ActionGroup" stepKey="searchByKeyword">
4241
<argument name="keyword" value="api-simple-product"/>
4342
</actionGroup>
44-
<click selector="{{AdminProductGridSection.productGridCheckboxOnRow('1')}}" stepKey="clickCheckbox1"/>
45-
<click selector="{{AdminProductGridSection.productGridCheckboxOnRow('2')}}" stepKey="clickCheckbox2"/>
46-
<!-- Mass update attributes -->
47-
<click selector="{{AdminProductGridSection.bulkActionDropdown}}" stepKey="clickDropdown"/>
48-
<click selector="{{AdminProductGridSection.bulkActionOption('Update attributes')}}" stepKey="clickOption"/>
49-
<waitForPageLoad stepKey="waitForBulkUpdatePage"/>
50-
<seeInCurrentUrl stepKey="seeInUrl" url="catalog/product_action_attribute/edit/"/>
51-
<click selector="{{AdminEditProductAttributesSection.ChangeAttributeNameToggle}}" stepKey="toggleToChangeName"/>
52-
<click selector="{{AdminEditProductAttributesSection.Save}}" stepKey="save"/>
43+
44+
<actionGroup ref="AdminCheckProductOnProductGridActionGroup" stepKey="clickCheckbox1">
45+
<argument name="product" value="$$createProductOne$$"/>
46+
</actionGroup>
47+
48+
<actionGroup ref="AdminCheckProductOnProductGridActionGroup" stepKey="clickCheckbox2">
49+
<argument name="product" value="$$createProductTwo$$"/>
50+
</actionGroup>
51+
52+
<actionGroup ref="AdminClickMassUpdateProductAttributesActionGroup" stepKey="clickDropdown"/>
53+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickOption"/>
54+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForBulkUpdatePage"/>
55+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="seeInUrl"/>
56+
57+
<actionGroup ref="AdminCheckNameToggleOnProductsMassAttributesUpdateActionGroup" stepKey="toggleToChangeName"/>
58+
59+
<actionGroup ref="AdminClickSaveOnProductsMassAttributesUpdateActionGroup" stepKey="save"/>
5360
<see stepKey="seeError" selector="{{AdminEditProductAttributesSection.NameError}}" userInput="This is a required field"/>
5461
</test>
5562
</tests>

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
</before>
4949

5050
<after>
51+
<!-- Customer Log Out -->
52+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutStorefront"/>
5153
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
5254
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
5355
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
@@ -70,7 +72,7 @@
7072
<actionGroup ref="AdminOpenProductIndexPageActionGroup" stepKey="amOnProductGridPage"/>
7173
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearProductsGridFilters"/>
7274
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
73-
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogoutStorefront"/>
75+
<comment userInput="BIC workaround" stepKey="customerLogoutStorefront"/>
7476
</after>
7577

7678
<!-- Open Product Grid, Filter product and open -->

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,15 @@
3131
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogoutStorefront"/>
3232
</before>
3333
<after>
34+
<!-- Logout customer -->
35+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="logoutStorefront"/>
3436
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
3537
<!-- Delete product and category -->
3638
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
3739
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
3840
<actionGroup ref="AdminOrdersGridClearFiltersActionGroup" stepKey="clearOrderListingFilters"/>
3941
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutAdmin"/>
40-
<!-- Logout customer -->
41-
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogoutStorefront"/>
42+
<comment userInput="BIC workaround" stepKey="customerLogoutStorefront"/>
4243
</after>
4344

4445
<!-- Login Customer Storefront -->

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
<createData entity="Simple_US_Customer" stepKey="createCustomer"/>
3434
</before>
3535
<after>
36+
<!-- Customer Log Out -->
37+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/>
3638
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
3739
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
3840
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/composite/configure.phtml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@ $blockId = $block->getId();
1010
<div id="product_composite_configure"
1111
class="product-configure-popup product-configure-popup-<?= $block->escapeHtmlAttr($blockId) ?>">
1212
<iframe name="product_composite_configure_iframe" id="product_composite_configure_iframe"></iframe>
13-
<?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
14-
'onload',
15-
"window.productConfigure && productConfigure.onLoadIFrame()",
16-
'iframe[name=\'product_composite_configure_iframe\']:last-of-type'
17-
) ?>
1813

1914
<form action="" method="post" id="product_composite_configure_form" enctype="multipart/form-data"
2015
target="product_composite_configure_iframe" class="product_composite_configure_form">
@@ -85,3 +80,8 @@ script;
8580
?>
8681
<?= /* @noEscape */ $secureRenderer->renderTag('script', [], $scriptString, false); ?>
8782
</div>
83+
<?= /* @noEscape */ $secureRenderer->renderEventListenerAsTag(
84+
'onload',
85+
"window.productConfigure && productConfigure.onLoadIFrame()",
86+
'iframe[name=\'product_composite_configure_iframe\']:last-of-type'
87+
) ?>

app/code/Magento/CatalogGraphQl/Model/Resolver/Product/PriceRange.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,13 @@ public function resolve(
6363
$product = $value['model'];
6464
$product->unsetData('minimal_price');
6565

66+
if ($context) {
67+
$customerGroupId = $context->getExtensionAttributes()->getCustomerGroupId();
68+
if ($customerGroupId !== null) {
69+
$product->setCustomerGroupId($customerGroupId);
70+
}
71+
}
72+
6673
$requestedFields = $info->getFieldSelection(10);
6774
$returnArray = [];
6875

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@
3838
<!-- Delete products and category -->
3939
<deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct"/>
4040
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
41-
41+
<!-- Customer Log Out -->
42+
<actionGroup ref="StorefrontCustomerLogoutActionGroup" stepKey="customerLogout"/>
43+
4244
<!-- Delete customer -->
4345
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
4446

app/code/Magento/CatalogUrlRewriteGraphQl/Model/Resolver/CategoryUrlSuffix.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ private function getCategoryUrlSuffix(int $storeId): ?string
7575
self::$xml_path_category_url_suffix,
7676
ScopeInterface::SCOPE_STORE,
7777
$storeId
78-
);
78+
) ?? '';
7979
}
8080
return $this->categoryUrlSuffix[$storeId];
8181
}

app/code/Magento/CatalogUrlRewriteGraphQl/Model/Resolver/ProductUrlSuffix.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ private function getProductUrlSuffix(int $storeId): ?string
7575
self::$xml_path_product_url_suffix,
7676
ScopeInterface::SCOPE_STORE,
7777
$storeId
78-
);
78+
) ?? '';
7979
}
8080
return $this->productUrlSuffix[$storeId];
8181
}

0 commit comments

Comments
 (0)