Skip to content

Commit

Permalink
merge magento/2.4-develop into magento-tsg/2.4-develop-pr39
Browse files Browse the repository at this point in the history
  • Loading branch information
magento-mts-svc authored Jun 2, 2020
2 parents c2dff95 + 6b3b90b commit ea532db
Show file tree
Hide file tree
Showing 3,453 changed files with 4,271 additions and 224,927 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
11 changes: 10 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Fields marked with (*) are required. Please don't remove the template.

### Preconditions (*)
<!---
Provide the exact Magento version (example: 2.3.2) and any important information on the environment where bug is reproducible.
Provide the exact Magento version (example: 2.4.0) and any important information on the environment where bug is reproducible.
-->
1.
2.
Expand All @@ -32,3 +32,12 @@ Important: Provide a set of clear steps to reproduce this bug. We can not provid
<!--- Tell us what happened instead. Include error messages and issues. -->
1. [Screenshots, logs or description]
2.

---
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.

- [ ] Severity: **S0** _- Affects critical data or functionality and leaves users without workaround._
- [ ] Severity: **S1** _- Affects critical data or functionality and forces users to employ a workaround._
- [ ] Severity: **S2** _- Affects non-critical data or functionality and forces users to employ a workaround._
- [ ] Severity: **S3** _- Affects non-critical data or functionality and does not force users to employ a workaround._
- [ ] Severity: **S4** _- Affects aesthetics, professional look and feel, “quality” or “usability”._
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/developer-experience-issue.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,12 @@ Fields marked with (*) are required. Please don't remove the template.

### Proposed solution
<!--- Suggest your potential solutions for this issue. -->

---
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.

- [ ] Severity: **S0** _- Affects critical data or functionality and leaves users with no workaround._
- [ ] Severity: **S1** _- Affects critical data or functionality and forces users to employ a workaround._
- [ ] Severity: **S2** _- Affects non-critical data or functionality and forces users to employ a workaround._
- [ ] Severity: **S3** _- Affects non-critical data or functionality and does not force users to employ a workaround._
- [ ] Severity: **S4** _- Affects aesthetics, professional look and feel, “quality” or “usability”._
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
If relevant, please provide a list of fixed issues in the format magento/magento2#<issue_number>.
There could be 1 or more issues linked here and it will help us find some more information about the reasoning behind this change.
-->
1. magento/magento2#<issue_number>: Issue title
1. Fixes magento/magento2#<issue_number>

### Manual testing scenarios (*)
<!---
Expand Down
3 changes: 0 additions & 3 deletions .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@

$finder = PhpCsFixer\Finder::create()
->name('*.phtml')
->exclude('dev/tests/functional/generated')
->exclude('dev/tests/functional/var')
->exclude('dev/tests/functional/vendor')
->exclude('dev/tests/integration/tmp')
->exclude('dev/tests/integration/var')
->exclude('lib/internal/Cm')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Show extends Action implements HttpGetActionInterface
/**
* @inheritdoc
*/
const ADMIN_RESOURCE = 'Magento_Analytics::analytics_settings';
const ADMIN_RESOURCE = 'Magento_Analytics::advanced_reporting';

/**
* @param Context $context
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="CliCacheCleanActionGroup">
<annotations>
<description>Run cache:clean by CLI with specified cache tags (space separated).</description>
</annotations>
<arguments>
<argument name="tags" type="string"/>
</arguments>

<magentoCLI command="cache:clean" arguments="{{tags}}" stepKey="cleanSpecifiedCache"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="CliCacheFlushActionGroup">
<annotations>
<description>Run cache:flush by CLI with specified cache tags (space separated).</description>
</annotations>
<arguments>
<argument name="tags" type="string"/>
</arguments>

<magentoCLI command="cache:flush" arguments="{{tags}}" stepKey="flushSpecifiedCache"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
<group value="login"/>
</annotations>


<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
<actionGroup ref="AssertAdminSuccessLoginActionGroup" stepKey="assertLoggedIn"/>
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutFromAdmin"/>
Expand Down
6 changes: 2 additions & 4 deletions app/code/Magento/Backend/etc/adminhtml/system.xml
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@
</group>
<group id="upload_configuration" translate="label" type="text" sortOrder="1000" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Images Upload Configuration</label>
<field id="enable_resize" translate="label" type="select" sortOrder="200" showInDefault="1" canRestore="1">
<field id="enable_resize" translate="label comment" type="select" sortOrder="200" showInDefault="1" canRestore="1">
<label>Enable Frontend Resize</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<comment>Resize performed via javascript before file upload.</comment>
Expand Down Expand Up @@ -459,9 +459,7 @@
<label>Add Store Code to Urls</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
<backend_model>Magento\Config\Model\Config\Backend\Store</backend_model>
<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>
<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>
</field>
<field id="redirect_to_base" translate="label comment" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">
<label>Auto-redirect to Base URL</label>
Expand Down
8 changes: 3 additions & 5 deletions app/code/Magento/Backend/i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -403,11 +403,9 @@ Security,Security
Web,Web
"Url Options","Url Options"
"Add Store Code to Urls","Add Store Code to Urls"
"
<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.).
"
"<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.)."
"Enable Frontend Resize","Enable Frontend Resize"
"Resize performed via javascript before file upload.","Resize performed via javascript before file upload."
"Auto-redirect to Base URL","Auto-redirect to Base URL"
"Search Engine Optimization","Search Engine Optimization"
"Use Web Server Rewrites","Use Web Server Rewrites"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function __construct(
* @param string $value
* @param int $length
* @param string $etc
* @param string &$remainder
* @param string $remainder
* @param bool $breakWords
* @return string
*/
Expand Down Expand Up @@ -83,6 +83,7 @@ public function getChildren($item)
}

if ($items) {
$itemsArray[$item->getOrderItem()->getId()][$item->getOrderItemId()] = $item;
foreach ($items as $value) {
$parentItem = $value->getOrderItem()->getParentItem();
if ($parentItem) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<requiredEntity createDataKey="createBundleOption"/>
<requiredEntity createDataKey="createSimpleProduct"/>
</createData>
<magentoCron stepKey="runCronIndex" groups="index"/>
<magentoCLI stepKey="runCronIndex" command="cron:run --group=index"/>
</before>
<after>
<!-- Delete Simple Product -->
Expand All @@ -56,9 +56,11 @@
<actionGroup ref="AdminUpdateProductNameAndDescriptionAttributes" stepKey="updateProductAttribute">
<argument name="product" value="UpdateAttributeNameAndDescription"/>
</actionGroup>
<!--Run cron twice-->
<magentoCLI command="cron:run" stepKey="cronRun"/>
<magentoCLI command="cron:run" stepKey="cronRunTwice"/>
<!-- Start message queue for product attribute consumer -->
<actionGroup ref="CliConsumerStartActionGroup" stepKey="startMessageQueue">
<argument name="consumerName" value="{{AdminProductAttributeUpdateMessageConsumerData.consumerName}}"/>
<argument name="maxMessages" value="{{AdminProductAttributeUpdateMessageConsumerData.messageLimit}}"/>
</actionGroup>
<!-- Search for a product with a new name and Open Product -->
<actionGroup ref="FilterProductGridByNameActionGroup" stepKey="searchWithNewProductName">
<argument name="product" value="UpdateAttributeNameAndDescription"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;

/**
* Test Renderer order item
*/
class RendererTest extends TestCase
{
/** @var Item|MockObject */
Expand Down Expand Up @@ -98,25 +101,27 @@ public function testGetChildren($parentItem)
$parentItem = $this->createPartialMock(Item::class, ['getId', '__wakeup']);
$parentItem->expects($this->any())->method('getId')->willReturn(1);
}
$this->orderItem->expects($this->any())->method('getOrderItem')->willReturnSelf();
$this->orderItem->expects($this->any())->method('getParentItem')->willReturn($parentItem);
$this->orderItem->expects($this->any())->method('getOrderItemId')->willReturn(2);
$this->orderItem->expects($this->any())->method('getId')->willReturn(1);
$this->orderItem->method('getOrderItem')->willReturnSelf();
$this->orderItem->method('getParentItem')->willReturn($parentItem);
$this->orderItem->method('getOrderItemId')->willReturn(2);
$this->orderItem->method('getId')->willReturn(1);

$salesModel = $this->createPartialMock(
Invoice::class,
['getAllItems', '__wakeup']
);
$salesModel->expects($this->once())->method('getAllItems')->willReturn([$this->orderItem]);
$salesModel->method('getAllItems')->willReturn([$this->orderItem]);

$item = $this->createPartialMock(
\Magento\Sales\Model\Order\Invoice\Item::class,
['getInvoice', 'getOrderItem', '__wakeup']
['getInvoice', 'getOrderItem', 'getOrderItemId', '__wakeup']
);
$item->expects($this->once())->method('getInvoice')->willReturn($salesModel);
$item->expects($this->any())->method('getOrderItem')->willReturn($this->orderItem);
$item->method('getInvoice')->willReturn($salesModel);
$item->method('getOrderItem')->willReturn($this->orderItem);
$item->method('getOrderItemId')->willReturn($this->orderItem->getOrderItemId());

$this->assertSame([2 => $this->orderItem], $this->model->getChildren($item));
$orderItem = $this->model->getChildren($item);
$this->assertSame([2 => $this->orderItem], $orderItem);
}

/**
Expand Down
9 changes: 4 additions & 5 deletions app/code/Magento/Catalog/Model/ResourceModel/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -469,10 +469,6 @@ protected function _saveCategoryProducts($category)

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

$category->setChangedProductIds($productIds);
}
Expand All @@ -484,6 +480,10 @@ protected function _saveCategoryProducts($category)
* Setting affected products to category for third party engine index refresh
*/
$productIds = array_keys($insert + $delete + $update);
$this->_eventManager->dispatch(
'catalog_category_change_products',
['category' => $category, 'product_ids' => $productIds]
);
$category->setAffectedProductIds($productIds);
}
return $this;
Expand Down Expand Up @@ -1078,7 +1078,6 @@ public function countVisible()
*/
public function load($object, $entityId, $attributes = [])
{
$this->_attributes = [];
$select = $this->_getLoadRowSelect($object, $entityId);
$row = $this->getConnection()->fetchRow($select);

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
<actionGroup name="AdminCreateSimpleProductActionGroup">
<annotations>
<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>
</annotations>
<arguments>
<argument name="category"/>
<argument name="simpleProduct"/>
</arguments>

<amOnPage url="{{AdminProductIndexPage.url}}" stepKey="navigateToProductIndex"/>
<click selector="{{AdminProductGridActionSection.addProductToggle}}" stepKey="clickAddProductDropdown"/>
<click selector="{{AdminProductGridActionSection.addSimpleProduct}}" stepKey="clickAddSimpleProduct"/>
<fillField userInput="{{simpleProduct.name}}" selector="{{AdminProductFormSection.productName}}" stepKey="fillName"/>
<fillField userInput="{{simpleProduct.sku}}" selector="{{AdminProductFormSection.productSku}}" stepKey="fillSKU"/>
<fillField userInput="{{simpleProduct.price}}" selector="{{AdminProductFormSection.productPrice}}" stepKey="fillPrice"/>
<fillField userInput="{{simpleProduct.quantity}}" selector="{{AdminProductFormSection.productQuantity}}" stepKey="fillQuantity"/>
<searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[{{category.name}}]" stepKey="searchAndSelectCategory"/>
<click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="openSeoSection"/>
<fillField userInput="{{simpleProduct.urlKey}}" selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="fillUrlKey"/>

<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="saveProduct"/>
<seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="assertSaveMessageSuccess"/>
<seeInField userInput="{{simpleProduct.name}}" selector="{{AdminProductFormSection.productName}}" stepKey="assertFieldName"/>
<seeInField userInput="{{simpleProduct.sku}}" selector="{{AdminProductFormSection.productSku}}" stepKey="assertFieldSku"/>
<seeInField userInput="{{simpleProduct.price}}" selector="{{AdminProductFormSection.productPrice}}" stepKey="assertFieldPrice"/>
<click selector="{{AdminProductSEOSection.sectionHeader}}" stepKey="openSeoSectionAssert"/>
<seeInField userInput="{{simpleProduct.urlKey}}" selector="{{AdminProductSEOSection.urlKeyInput}}" stepKey="assertFieldUrlKey"/>
</actionGroup>
</actionGroups>
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
<waitForPageLoad stepKey="waitForCatalogSubmenu" time="5"/>
<click stepKey="clickOnProducts" selector="{{CatalogSubmenuSection.products}}"/>
<waitForPageLoad stepKey="waitForProductsPage" time="10"/>
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clickClearFilters"/>
<click stepKey="TickCheckbox" selector="{{ProductsPageSection.checkboxForProduct(productName)}}"/>
<scrollToTopOfPage stepKey="scrollToTopOfPage"/>
<click stepKey="OpenActions" selector="{{ProductsPageSection.actions}}"/>
<waitForAjaxLoad stepKey="waitForDelete" time="5"/>
<click stepKey="ChooseDelete" selector="{{ProductsPageSection.delete}}"/>
Expand Down
19 changes: 19 additions & 0 deletions app/code/Magento/Catalog/Test/Mftf/Data/QueueConsumerData.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->

<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
<entity name="AdminProductAttributeUpdateConsumerData">
<data key="consumerName">product_action_attribute.update</data>
<data key="messageLimit">100</data>
</entity>
<entity name="AdminProductAttributeWebsiteUpdateConsumerData">
<data key="consumerName">product_action_attribute.website.update</data>
<data key="messageLimit">100</data>
</entity>
</entities>
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
<!--Open Index Management Page and Select Index mode "Update by Schedule" -->
<magentoCLI stepKey="setIndexerMode" command="indexer:set-mode" arguments="schedule" />
<!-- Run cron twice -->
<magentoCLI command="cron:run" stepKey="runCron1"/>
<magentoCLI command="cron:run" stepKey="runCron2"/>
<magentoCLI command="cron:run" arguments="--group=index" stepKey="runCron1"/>
<magentoCLI command="cron:run" arguments="--group=index" stepKey="runCron2"/>
</before>
<after>
<magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 0 "/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@
<!--Open Index Management Page and Select Index mode "Update by Schedule" -->
<magentoCLI stepKey="setIndexerMode" command="indexer:set-mode" arguments="schedule" />
<!-- Run cron twice -->
<magentoCLI command="cron:run" stepKey="runCron1"/>
<magentoCLI command="cron:run" stepKey="runCron2"/>
<magentoCLI command="cron:run" arguments="--group=index" stepKey="runCron1"/>
<magentoCLI command="cron:run" arguments="--group=index" stepKey="runCron2"/>
</before>
<after>
<magentoCLI stepKey="setFlatCatalogCategory" command="config:set catalog/frontend/flat_catalog_category 0 "/>
Expand Down
Loading

0 comments on commit ea532db

Please sign in to comment.