Skip to content

Commit 88016bf

Browse files
committed
Merge remote-tracking branch 'mainline/2.4.1-develop' into 2.4-develop-241-sync
2 parents a0e4d1e + f824b9e commit 88016bf

File tree

121 files changed

+4015
-818
lines changed

Some content is hidden

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

121 files changed

+4015
-818
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Fields marked with (*) are required. Please don't remove the template.
1111

1212
### Preconditions (*)
1313
<!---
14-
Provide the exact Magento version (example: 2.3.2) and any important information on the environment where bug is reproducible.
14+
Provide the exact Magento version (example: 2.4.0) and any important information on the environment where bug is reproducible.
1515
-->
1616
1.
1717
2.
@@ -32,3 +32,12 @@ Important: Provide a set of clear steps to reproduce this bug. We can not provid
3232
<!--- Tell us what happened instead. Include error messages and issues. -->
3333
1. [Screenshots, logs or description]
3434
2.
35+
36+
---
37+
Please provide [Severity](https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#backlog) assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
38+
39+
- [ ] Severity: **S0** _- Affects critical data or functionality and leaves users without workaround._
40+
- [ ] Severity: **S1** _- Affects critical data or functionality and forces users to employ a workaround._
41+
- [ ] Severity: **S2** _- Affects non-critical data or functionality and forces users to employ a workaround._
42+
- [ ] Severity: **S3** _- Affects non-critical data or functionality and does not force users to employ a workaround._
43+
- [ ] Severity: **S4** _- Affects aesthetics, professional look and feel, “quality” or “usability”._

.github/ISSUE_TEMPLATE/developer-experience-issue.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,12 @@ Fields marked with (*) are required. Please don't remove the template.
1818

1919
### Proposed solution
2020
<!--- Suggest your potential solutions for this issue. -->
21+
22+
---
23+
Please provide [Severity](https://devdocs.magento.com/guides/v2.3/contributor-guide/contributing.html#backlog) assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
24+
25+
- [ ] Severity: **S0** _- Affects critical data or functionality and leaves users with no workaround._
26+
- [ ] Severity: **S1** _- Affects critical data or functionality and forces users to employ a workaround._
27+
- [ ] Severity: **S2** _- Affects non-critical data or functionality and forces users to employ a workaround._
28+
- [ ] Severity: **S3** _- Affects non-critical data or functionality and does not force users to employ a workaround._
29+
- [ ] Severity: **S4** _- Affects aesthetics, professional look and feel, “quality” or “usability”._

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
If relevant, please provide a list of fixed issues in the format magento/magento2#<issue_number>.
2424
There could be 1 or more issues linked here and it will help us find some more information about the reasoning behind this change.
2525
-->
26-
1. magento/magento2#<issue_number>: Issue title
26+
1. Fixes magento/magento2#<issue_number>
2727

2828
### Manual testing scenarios (*)
2929
<!---

app/code/Magento/Analytics/Controller/Adminhtml/Reports/Show.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class Show extends Action implements HttpGetActionInterface
2727
/**
2828
* @inheritdoc
2929
*/
30-
const ADMIN_RESOURCE = 'Magento_Analytics::analytics_settings';
30+
const ADMIN_RESOURCE = 'Magento_Analytics::advanced_reporting';
3131

3232
/**
3333
* @param Context $context

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@
341341
</group>
342342
<group id="upload_configuration" translate="label" type="text" sortOrder="1000" showInDefault="1" showInWebsite="1" showInStore="1">
343343
<label>Images Upload Configuration</label>
344-
<field id="enable_resize" translate="label" type="select" sortOrder="200" showInDefault="1" canRestore="1">
344+
<field id="enable_resize" translate="label comment" type="select" sortOrder="200" showInDefault="1" canRestore="1">
345345
<label>Enable Frontend Resize</label>
346346
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
347347
<comment>Resize performed via javascript before file upload.</comment>
@@ -459,9 +459,7 @@
459459
<label>Add Store Code to Urls</label>
460460
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
461461
<backend_model>Magento\Config\Model\Config\Backend\Store</backend_model>
462-
<comment>
463-
<![CDATA[<strong style="color:red">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).]]>
464-
</comment>
462+
<comment><![CDATA[<strong style="color:red">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).]]></comment>
465463
</field>
466464
<field id="redirect_to_base" translate="label comment" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
467465
<label>Auto-redirect to Base URL</label>

app/code/Magento/Backend/i18n/en_US.csv

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -403,11 +403,9 @@ Security,Security
403403
Web,Web
404404
"Url Options","Url Options"
405405
"Add Store Code to Urls","Add Store Code to Urls"
406-
"
407-
<strong style=""color:red"">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).
408-
","
409-
<strong style=""color:red"">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).
410-
"
406+
"<strong style=""color:red"">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.).","<strong style=""color:red"">Warning!</strong> When using Store Code in URLs, in some cases system may not work properly if URLs without Store Codes are specified in the third-party services (e.g. PayPal etc.)."
407+
"Enable Frontend Resize","Enable Frontend Resize"
408+
"Resize performed via javascript before file upload.","Resize performed via javascript before file upload."
411409
"Auto-redirect to Base URL","Auto-redirect to Base URL"
412410
"Search Engine Optimization","Search Engine Optimization"
413411
"Use Web Server Rewrites","Use Web Server Rewrites"

app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function __construct(
5151
* @param string $value
5252
* @param int $length
5353
* @param string $etc
54-
* @param string &$remainder
54+
* @param string $remainder
5555
* @param bool $breakWords
5656
* @return string
5757
*/
@@ -83,6 +83,7 @@ public function getChildren($item)
8383
}
8484

8585
if ($items) {
86+
$itemsArray[$item->getOrderItem()->getId()][$item->getOrderItemId()] = $item;
8687
foreach ($items as $value) {
8788
$parentItem = $value->getOrderItem()->getParentItem();
8889
if ($parentItem) {

app/code/Magento/Bundle/Test/Unit/Block/Adminhtml/Sales/Order/Items/RendererTest.php

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
use PHPUnit\Framework\MockObject\MockObject;
1818
use PHPUnit\Framework\TestCase;
1919

20+
/**
21+
* Test Renderer order item
22+
*/
2023
class RendererTest extends TestCase
2124
{
2225
/** @var Item|MockObject */
@@ -98,25 +101,27 @@ public function testGetChildren($parentItem)
98101
$parentItem = $this->createPartialMock(Item::class, ['getId', '__wakeup']);
99102
$parentItem->expects($this->any())->method('getId')->willReturn(1);
100103
}
101-
$this->orderItem->expects($this->any())->method('getOrderItem')->willReturnSelf();
102-
$this->orderItem->expects($this->any())->method('getParentItem')->willReturn($parentItem);
103-
$this->orderItem->expects($this->any())->method('getOrderItemId')->willReturn(2);
104-
$this->orderItem->expects($this->any())->method('getId')->willReturn(1);
104+
$this->orderItem->method('getOrderItem')->willReturnSelf();
105+
$this->orderItem->method('getParentItem')->willReturn($parentItem);
106+
$this->orderItem->method('getOrderItemId')->willReturn(2);
107+
$this->orderItem->method('getId')->willReturn(1);
105108

106109
$salesModel = $this->createPartialMock(
107110
Invoice::class,
108111
['getAllItems', '__wakeup']
109112
);
110-
$salesModel->expects($this->once())->method('getAllItems')->willReturn([$this->orderItem]);
113+
$salesModel->method('getAllItems')->willReturn([$this->orderItem]);
111114

112115
$item = $this->createPartialMock(
113116
\Magento\Sales\Model\Order\Invoice\Item::class,
114-
['getInvoice', 'getOrderItem', '__wakeup']
117+
['getInvoice', 'getOrderItem', 'getOrderItemId', '__wakeup']
115118
);
116-
$item->expects($this->once())->method('getInvoice')->willReturn($salesModel);
117-
$item->expects($this->any())->method('getOrderItem')->willReturn($this->orderItem);
119+
$item->method('getInvoice')->willReturn($salesModel);
120+
$item->method('getOrderItem')->willReturn($this->orderItem);
121+
$item->method('getOrderItemId')->willReturn($this->orderItem->getOrderItemId());
118122

119-
$this->assertSame([2 => $this->orderItem], $this->model->getChildren($item));
123+
$orderItem = $this->model->getChildren($item);
124+
$this->assertSame([2 => $this->orderItem], $orderItem);
120125
}
121126

122127
/**

app/code/Magento/Catalog/Model/ResourceModel/Category.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -469,10 +469,6 @@ protected function _saveCategoryProducts($category)
469469

470470
if (!empty($insert) || !empty($delete)) {
471471
$productIds = array_unique(array_merge(array_keys($insert), array_keys($delete)));
472-
$this->_eventManager->dispatch(
473-
'catalog_category_change_products',
474-
['category' => $category, 'product_ids' => $productIds]
475-
);
476472

477473
$category->setChangedProductIds($productIds);
478474
}
@@ -484,6 +480,10 @@ protected function _saveCategoryProducts($category)
484480
* Setting affected products to category for third party engine index refresh
485481
*/
486482
$productIds = array_keys($insert + $delete + $update);
483+
$this->_eventManager->dispatch(
484+
'catalog_category_change_products',
485+
['category' => $category, 'product_ids' => $productIds]
486+
);
487487
$category->setAffectedProductIds($productIds);
488488
}
489489
return $this;
@@ -1078,7 +1078,6 @@ public function countVisible()
10781078
*/
10791079
public function load($object, $entityId, $attributes = [])
10801080
{
1081-
$this->_attributes = [];
10821081
$select = $this->_getLoadRowSelect($object, $entityId);
10831082
$row = $this->getConnection()->fetchRow($select);
10841083

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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="AdminCreateSimpleProductActionGroup">
12+
<annotations>
13+
<description>Goes to the Admin Product grid page. Clicks on Add. Fills the provided Product details (Name, SKU, Price, Quantity, Category and URL). Clicks on Save. Validates that the Product details are present and correct.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="category"/>
17+
<argument name="simpleProduct"/>
18+
</arguments>
19+
20+
<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
21+
<click selector="{{AdminProductGridActionSection.addProductToggle}}" stepKey="clickAddProductDropdown"/>
22+
<click selector="{{AdminProductGridActionSection.addSimpleProduct}}" stepKey="clickAddSimpleProduct"/>
23+
<fillField userInput="{{simpleProduct.name}}" selector="{{AdminProductFormSection.productName}}" stepKey="fillName"/>
24+
<fillField userInput="{{simpleProduct.sku}}" selector="{{AdminProductFormSection.productSku}}" stepKey="fillSKU"/>
25+
<fillField userInput="{{simpleProduct.price}}" selector="{{AdminProductFormSection.productPrice}}" stepKey="fillPrice"/>
26+
<fillField userInput="{{simpleProduct.quantity}}" selector="{{AdminProductFormSection.productQuantity}}" stepKey="fillQuantity"/>
27+
<searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[{{category.name}}]" stepKey="searchAndSelectCategory"/>
28+
<click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="openSeoSection"/>
29+
<fillField userInput="{{simpleProduct.urlKey}}" selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="fillUrlKey"/>
30+
31+
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveProduct"/>
32+
<seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="assertSaveMessageSuccess"/>
33+
<seeInField userInput="{{simpleProduct.name}}" selector="{{AdminProductFormSection.productName}}" stepKey="assertFieldName"/>
34+
<seeInField userInput="{{simpleProduct.sku}}" selector="{{AdminProductFormSection.productSku}}" stepKey="assertFieldSku"/>
35+
<seeInField userInput="{{simpleProduct.price}}" selector="{{AdminProductFormSection.productPrice}}" stepKey="assertFieldPrice"/>
36+
<click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="openSeoSectionAssert"/>
37+
<seeInField userInput="{{simpleProduct.urlKey}}" selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="assertFieldUrlKey"/>
38+
</actionGroup>
39+
</actionGroups>

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
</after>
4242

4343
<!-- Login Customer Storefront -->
44-
45-
<amOnPage url="{{StorefrontCustomerSignInPage.url}}" stepKey="amOnSignInPage"/>
46-
<fillField userInput="$$createCustomer.email$$" selector="{{StorefrontCustomerSignInFormSection.emailField}}" stepKey="fillEmail"/>
47-
<fillField userInput="$$createCustomer.password$$" selector="{{StorefrontCustomerSignInFormSection.passwordField}}" stepKey="fillPassword"/>
48-
<click selector="{{StorefrontCustomerSignInFormSection.signInAccountButton}}" stepKey="clickSignInAccountButton"/>
44+
<actionGroup ref="StorefrontOpenCustomerLoginPageActionGroup" stepKey="goToSignInPage"/>
45+
<actionGroup ref="StorefrontFillCustomerLoginFormActionGroup" stepKey="fillLoginFormWithCorrectCredentials">
46+
<argument name="customer" value="$$createCustomer$$"/>
47+
</actionGroup>
48+
<actionGroup ref="StorefrontClickSignOnCustomerLoginFormActionGroup" stepKey="clickSignInAccountButton" />
4949

5050
<!-- Checking the correctness of displayed prices for user parameters -->
5151

0 commit comments

Comments
 (0)