Skip to content

Commit

Permalink
Merge pull request #5738 from magento-honey-badgers/2.4-develop-241-sync
Browse files Browse the repository at this point in the history
[honey] MC-33700: TransportBuilder unable to send emails of Content-Type "text/plain"
  • Loading branch information
cpartica authored May 29, 2020
2 parents a0e4d1e + 88016bf commit 97f9b00
Show file tree
Hide file tree
Showing 121 changed files with 4,015 additions and 818 deletions.
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
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
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 @@ -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 @@ -41,11 +41,11 @@
</after>

<!-- Login Customer Storefront -->

<amOnPage url="{{StorefrontCustomerSignInPage.url}}" stepKey="amOnSignInPage"/>
<fillField userInput="$$createCustomer.email$$" selector="{{StorefrontCustomerSignInFormSection.emailField}}" stepKey="fillEmail"/>
<fillField userInput="$$createCustomer.password$$" selector="{{StorefrontCustomerSignInFormSection.passwordField}}" stepKey="fillPassword"/>
<click selector="{{StorefrontCustomerSignInFormSection.signInAccountButton}}" stepKey="clickSignInAccountButton"/>
<actionGroup ref="StorefrontOpenCustomerLoginPageActionGroup" stepKey="goToSignInPage"/>
<actionGroup ref="StorefrontFillCustomerLoginFormActionGroup" stepKey="fillLoginFormWithCorrectCredentials">
<argument name="customer" value="$$createCustomer$$"/>
</actionGroup>
<actionGroup ref="StorefrontClickSignOnCustomerLoginFormActionGroup" stepKey="clickSignInAccountButton" />

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

Expand Down
Loading

0 comments on commit 97f9b00

Please sign in to comment.