Skip to content

Commit 176e388

Browse files
authored
Merge pull request #8181 from magento-gl/2.4.6-develop-sync
[DO NOT MERGE UNTIL 2.4.6 GA] 2.4.6 develop sync
2 parents b9101b1 + bfef50e commit 176e388

File tree

166 files changed

+3032
-3860
lines changed

Some content is hidden

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

166 files changed

+3032
-3860
lines changed

app/code/Magento/Backend/Block/System/Store/Grid/Render/Group.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
*/
66
namespace Magento\Backend\Block\System\Store\Grid\Render;
77

8+
use Magento\Framework\DataObject;
9+
810
/**
911
* Store render group
1012
*
@@ -13,9 +15,9 @@
1315
class Group extends \Magento\Backend\Block\Widget\Grid\Column\Renderer\AbstractRenderer
1416
{
1517
/**
16-
* {@inheritdoc}
18+
* @inheritDoc
1719
*/
18-
public function render(\Magento\Framework\DataObject $row)
20+
public function render(DataObject $row)
1921
{
2022
if (!$row->getData($this->getColumn()->getIndex())) {
2123
return null;
@@ -28,6 +30,6 @@ public function render(\Magento\Framework\DataObject $row)
2830
'">' .
2931
$this->escapeHtml($row->getData($this->getColumn()->getIndex())) .
3032
'</a><br />'
31-
. '(' . __('Code') . ': ' . $row->getGroupCode() . ')';
33+
. '(' . __('Code') . ': ' . $this->escapeHtml($row->getGroupCode()) . ')';
3234
}
3335
}

app/code/Magento/Backend/Block/Widget/Grid/Extended.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1067,10 +1067,11 @@ public function getCsv()
10671067
$data = [];
10681068
foreach ($this->getColumns() as $column) {
10691069
if (!$column->getIsSystem()) {
1070+
$exportField = (string)$column->getRowFieldExport($item);
10701071
$data[] = '"' . str_replace(
10711072
['"', '\\'],
10721073
['""', '\\\\'],
1073-
$column->getRowFieldExport($item) ?: ''
1074+
$exportField ?: ''
10741075
) . '"';
10751076
}
10761077
}

app/code/Magento/Backend/etc/adminhtml/system.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,9 +349,10 @@
349349
<field id="transport">smtp</field>
350350
</depends>
351351
</field>
352-
<field id="password" translate="label comment" type="password" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
352+
<field id="password" translate="label comment" type="obscure" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
353353
<label>Password</label>
354-
<comment>Username</comment>
354+
<comment>Password</comment>
355+
<backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
355356
<depends>
356357
<field id="transport">smtp</field>
357358
</depends>

app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ class Bundle extends AbstractView
3636
protected $options;
3737

3838
/**
39-
* Catalog product
40-
*
4139
* @var \Magento\Catalog\Helper\Product
4240
*/
4341
protected $catalogProduct;
@@ -405,7 +403,7 @@ private function getConfigData(Product $product, array $options)
405403
*/
406404
private function processOptions(string $optionId, array $options, DataObject $preConfiguredValues)
407405
{
408-
$preConfiguredQtys = $preConfiguredValues->getData("bundle_option_qty/${optionId}") ?? [];
406+
$preConfiguredQtys = $preConfiguredValues->getData("bundle_option_qty/{$optionId}") ?? [];
409407
$selections = $options[$optionId]['selections'];
410408
array_walk(
411409
$selections,

app/code/Magento/Catalog/Test/Unit/Model/CategoryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ public function testMoveWhenCannotFindParentCategory(): void
214214
{
215215
$this->expectException('Magento\Framework\Exception\LocalizedException');
216216
$this->expectExceptionMessage('Sorry, but we can\'t find the new parent category you selected.');
217-
$this->markTestIncomplete('MAGETWO-31165');
217+
$this->markTestSkipped('MAGETWO-31165');
218218
$parentCategory = $this->createPartialMock(
219219
Category::class,
220220
['getId', 'setStoreId', 'load']
@@ -260,7 +260,7 @@ public function testMoveWhenParentCategoryIsSameAsChildCategory(): void
260260
$this->expectExceptionMessage(
261261
'We can\'t move the category because the parent category name matches the child category name.'
262262
);
263-
$this->markTestIncomplete('MAGETWO-31165');
263+
$this->markTestSkipped('MAGETWO-31165');
264264
$parentCategory = $this->createPartialMock(
265265
Category::class,
266266
['getId', 'setStoreId', 'load']

app/code/Magento/CatalogGraphQl/Model/Resolver/Products/Query/Search.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ private function buildSearchCriteria(array $args, ResolveInfo $info): SearchCrit
186186
{
187187
$productFields = (array)$info->getFieldSelection(1);
188188
$includeAggregations = isset($productFields['filters']) || isset($productFields['aggregations']);
189-
$processedArgs = $this->argsSelection->process((string) $info->fieldName, $args);
189+
$fieldName = $info->fieldName ?? "";
190+
$processedArgs = $this->argsSelection->process((string) $fieldName, $args);
190191
$searchCriteria = $this->searchCriteriaBuilder->build($processedArgs, $includeAggregations);
191192

192193
return $searchCriteria;

app/code/Magento/Checkout/Test/Mftf/Section/StorefrontMinicartSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
<element name="productCountLabel" type="text" selector="//*[@id='minicart-content-wrapper']/div[2]/div[1]/span[2]"/>
4949
<element name="productCartName" type="text" selector="//tbody[@class='cart item']//strong[@class='product-item-name']//a[contains(text(),'{{var}}')]" parameterized="true"/>
5050
<element name="minicartclose" type="button" selector="//button[@id='btn-minicart-close']"/>
51+
<element name="productCountNew" type="text" selector=".minicart-wrapper .action.showcart .counter-number"/>
5152
<element name="image" type="text" selector="//*[@class='product-image-container']//img[contains(@src, '{{var1}}')]" parameterized="true"/>
5253
</section>
5354
</sections>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
10+
<test name="StorefrontCartItemsCountDisplayItemsDecimalQuantitiesTest">
11+
<annotations>
12+
<stories value="Validate mini cart decimal quantities items in cart"/>
13+
<title value="Checking by adding decimal quantities in mini cart"/>
14+
<description value="Checking by adding decimal quantities in mini cart"/>
15+
<testCaseId value="AC-7554"/>
16+
<severity value="AVERAGE"/>
17+
<group value="checkout"/>
18+
</annotations>
19+
20+
<before>
21+
<!--Set Display Cart Summary to display items quantities-->
22+
<magentoCLI command="config:set {{DisplayItemsQuantities.path}} {{DisplayItemsQuantities.value}}" stepKey="setDisplayCartSummary"/>
23+
<!--Create simple product-->
24+
<createData entity="_defaultCategory" stepKey="createPreReqCategory"/>
25+
<createData entity="SimpleProduct" stepKey="createPreReqSimpleProduct">
26+
<requiredEntity createDataKey="createPreReqCategory"/>
27+
</createData>
28+
</before>
29+
<after>
30+
<deleteData createDataKey="createPreReqCategory" stepKey="deletePreReqCategory"/>
31+
<deleteData createDataKey="createPreReqSimpleProduct" stepKey="deletePreReqSimpleProduct"/>
32+
<magentoCLI command="config:set {{DisplayItemsQuantities.path}} {{DisplayItemsQuantities.value}}" stepKey="resetDisplayCartSummary"/>
33+
</after>
34+
<!--Step1. Login as admin. Go to Catalog > Products page. Filtering *prod1*. Open *prod1* to edit-->
35+
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin" />
36+
<actionGroup ref="SearchForProductOnBackendActionGroup" stepKey="filterGroupedProductOptions">
37+
<argument name="product" value="SimpleProduct"/>
38+
</actionGroup>
39+
<click selector="{{AdminProductGridSection.productGridNameProduct('$$createPreReqSimpleProduct.name$$')}}" stepKey="clickOpenProductForEdit"/>
40+
<waitForPageLoad time="30" stepKey="waitForProductEditOpen"/>
41+
<!--Step2. Open *Advanced Inventory* pop-up (Click on *Advanced Inventory* link). Set *Qty Uses Decimals* to *Yes*. Click on button *Done* -->
42+
<actionGroup ref="AdminClickOnAdvancedInventoryLinkActionGroup" stepKey="clickOnAdvancedInventoryLink"/>
43+
<scrollTo selector="{{AdminProductFormAdvancedInventorySection.qtyUsesDecimals}}" stepKey="scrollToQtyUsesDecimalsDropBox"/>
44+
<click selector="{{AdminProductFormAdvancedInventorySection.qtyUsesDecimals}}" stepKey="clickOnQtyUsesDecimalsDropBox"/>
45+
<click selector="{{AdminProductFormAdvancedInventorySection.qtyUsesDecimalsOptions('1')}}" stepKey="chooseYesOnQtyUsesDecimalsDropBox"/>
46+
<uncheckOption selector="{{AdminProductFormAdvancedInventorySection.miniQtyConfigSetting}}" stepKey="uncheckMiniQtyCheckBox"/>
47+
<fillField selector="{{AdminProductFormAdvancedInventorySection.miniQtyAllowedInCart}}" userInput="0.5" stepKey="fillMinAllowedQty"/>
48+
<actionGroup ref="AdminSubmitAdvancedInventoryFormActionGroup" stepKey="clickOnDoneButton"/>
49+
<actionGroup ref="AdminProductFormSaveActionGroup" stepKey="clickOnSaveButton"/>
50+
<!-- Add simpleProduct to cart -->
51+
<actionGroup ref="StorefrontOpenProductPageActionGroup" stepKey="openProductPage">
52+
<argument name="productUrl" value="$createPreReqSimpleProduct.custom_attributes[url_key]$"/>
53+
</actionGroup>
54+
<actionGroup ref="AddProductWithQtyToCartFromStorefrontProductPageActionGroup" stepKey="addProduct2ToCart">
55+
<argument name="productName" value="$$createPreReqSimpleProduct.name$$"/>
56+
<argument name="productQty" value="0.5"/>
57+
</actionGroup>
58+
<!-- Open Mini Cart -->
59+
<actionGroup ref="StorefrontOpenMiniCartActionGroup" stepKey="openMiniCart"/>
60+
<!-- Assert Products Count in Mini Cart -->
61+
<see selector="{{StorefrontMinicartSection.productCountNew}}" userInput="0.5" stepKey="seeProductCountInCart"/>
62+
</test>
63+
</tests>

app/code/Magento/Checkout/view/frontend/web/template/minicart/content.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<!-- ko if: (getCartParam('summary_count') > 1) -->
3939
<span translate="'Items in Cart'"></span>
4040
<!--/ko-->
41-
<!-- ko if: (getCartParam('summary_count') === 1) -->
41+
<!-- ko if: (getCartParam('summary_count') <= 1) -->
4242
<span translate="'Item in Cart'"></span>
4343
<!--/ko-->
4444
</div>

app/code/Magento/Cms/Controller/Noroute/Index.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,21 @@
44
* Copyright © Magento, Inc. All rights reserved.
55
* See COPYING.txt for license details.
66
*/
7+
declare(strict_types=1);
8+
79
namespace Magento\Cms\Controller\Noroute;
810

11+
use Magento\Framework\Controller\Result\ForwardFactory;
12+
913
/**
1014
* @SuppressWarnings(PHPMD.AllPurposeAction)
1115
*/
1216
class Index extends \Magento\Framework\App\Action\Action
1317
{
1418
/**
15-
* @var \Magento\Framework\Controller\Result\ForwardFactory
19+
* @var ForwardFactory
1620
*/
17-
protected $resultForwardFactory;
21+
protected ForwardFactory $resultForwardFactory;
1822

1923
/**
2024
* @param \Magento\Framework\App\Action\Context $context
@@ -48,6 +52,7 @@ public function execute()
4852
if ($resultPage) {
4953
$resultPage->setStatusHeader(404, '1.1', 'Not Found');
5054
$resultPage->setHeader('Status', '404 File not found');
55+
$resultPage->setHeader('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0', true);
5156
return $resultPage;
5257
} else {
5358
/** @var \Magento\Framework\Controller\Result\Forward $resultForward */

0 commit comments

Comments
 (0)