Skip to content

Commit 1d5a0f3

Browse files
author
Joan He
committed
Merge remote-tracking branch 'upstream/2.3-develop' into MTS-683
2 parents 55af93a + d271281 commit 1d5a0f3

File tree

176 files changed

+7918
-1509
lines changed

Some content is hidden

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

176 files changed

+7918
-1509
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Please see LICENSE_EE.txt for the full text of the MEE License or visit https://
6464

6565
## Community Engineering Slack
6666

67-
To connect with Magento and the Community, join us on the [Magento Community Engineering Slack](https://magentocommeng.slack.com). If you are interested in joining Slack, or a specific channel, send us a request at [engcom@adobe.com](mailto:engcom@adobe.com) or [self signup](https://tinyurl.com/engcom-slack).
67+
To connect with Magento and the Community, join us on the [Magento Community Engineering Slack](https://magentocommeng.slack.com). If you are interested in joining Slack, or a specific channel, send us a request at [engcom@adobe.com](mailto:engcom@adobe.com) or [self signup](https://opensource.magento.com/slack).
6868

6969

7070
We have channels for each project. These channels are recommended for new members:

app/code/Magento/Authorizenet/view/adminhtml/web/js/direct-post.js

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,11 @@
33
* See COPYING.txt for license details.
44
*/
55

6-
(function (factory) {
7-
if (typeof define === 'function' && define.amd) {
8-
define([
9-
'jquery',
10-
'mage/backend/validation',
11-
'prototype'
12-
], factory);
13-
} else {
14-
factory(jQuery);
15-
}
16-
}(function (jQuery) {
17-
6+
define([
7+
'jquery',
8+
'mage/backend/validation',
9+
'prototype'
10+
], function (jQuery) {
1811
window.directPost = Class.create();
1912
directPost.prototype = {
2013
initialize: function (methodCode, iframeId, controller, orderSaveUrl, cgiUrl, nativeAction) {
@@ -349,4 +342,4 @@
349342
}
350343
}
351344
};
352-
}));
345+
});

app/code/Magento/Backend/view/adminhtml/templates/widget/grid.phtml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,9 @@ $numColumns = $block->getColumns() !== null ? count($block->getColumns()) : 0;
170170
<?php if ($block->getSortableUpdateCallback()) : ?>
171171
<?= $block->escapeJs($block->getJsObjectName()) ?>.sortableUpdateCallback = <?= /* @noEscape */ $block->getSortableUpdateCallback() ?>;
172172
<?php endif; ?>
173+
<?php if ($block->getFilterKeyPressCallback()) : ?>
174+
<?= $block->escapeJs($block->getJsObjectName()) ?>.filterKeyPressCallback = <?= /* @noEscape */ $block->getFilterKeyPressCallback() ?>;
175+
<?php endif; ?>
173176
<?= $block->escapeJs($block->getJsObjectName()) ?>.bindSortable();
174177
<?php if ($block->getRowInitCallback()) : ?>
175178
<?= $block->escapeJs($block->getJsObjectName()) ?>.initRowCallback = <?= /* @noEscape */ $block->getRowInitCallback() ?>;

app/code/Magento/Backend/view/adminhtml/templates/widget/grid/extended.phtml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,9 @@ $numColumns = count($block->getColumns());
272272
<?php if ($block->getCheckboxCheckCallback()) : ?>
273273
<?= $block->escapeJs($block->getJsObjectName()) ?>.checkboxCheckCallback = <?= /* @noEscape */ $block->getCheckboxCheckCallback() ?>;
274274
<?php endif; ?>
275+
<?php if ($block->getFilterKeyPressCallback()) : ?>
276+
<?= $block->escapeJs($block->getJsObjectName()) ?>.filterKeyPressCallback = <?= /* @noEscape */ $block->getFilterKeyPressCallback() ?>;
277+
<?php endif; ?>
275278
<?php if ($block->getRowInitCallback()) : ?>
276279
<?= $block->escapeJs($block->getJsObjectName()) ?>.initRowCallback = <?= /* @noEscape */ $block->getRowInitCallback() ?>;
277280
<?= $block->escapeJs($block->getJsObjectName()) ?>.initGridRows();

app/code/Magento/Backend/view/adminhtml/web/js/translate.js

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,10 @@
44
*/
55

66
/* eslint-disable strict */
7-
(function (factory) {
8-
if (typeof define === 'function' && define.amd) {
9-
define([
10-
'jquery',
11-
'mage/mage'
12-
], factory);
13-
} else {
14-
factory(jQuery);
15-
}
16-
}(function ($) {
7+
define([
8+
'jquery',
9+
'mage/mage'
10+
], function ($) {
1711
$.extend(true, $, {
1812
mage: {
1913
translate: (function () {
@@ -51,4 +45,4 @@
5145
$.mage.__ = $.proxy($.mage.translate.translate, $.mage.translate);
5246

5347
return $.mage.__;
54-
}));
48+
});

app/code/Magento/Braintree/Gateway/Validator/ErrorCodeProvider.php

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use Braintree\Error\Validation;
1212
use Braintree\Result\Error;
1313
use Braintree\Result\Successful;
14+
use Braintree\Transaction;
1415

1516
/**
1617
* Processes errors codes from Braintree response.
@@ -38,12 +39,14 @@ public function getErrorCodes($response): array
3839
$result[] = $error->code;
3940
}
4041

41-
if (isset($response->transaction) && $response->transaction->status === 'gateway_rejected') {
42-
$result[] = $response->transaction->gatewayRejectionReason;
43-
}
42+
if (isset($response->transaction) && $response->transaction) {
43+
if ($response->transaction->status === Transaction::GATEWAY_REJECTED) {
44+
$result[] = $response->transaction->gatewayRejectionReason;
45+
}
4446

45-
if (isset($response->transaction) && $response->transaction->status === 'processor_declined') {
46-
$result[] = $response->transaction->processorResponseCode;
47+
if ($response->transaction->status === Transaction::PROCESSOR_DECLINED) {
48+
$result[] = $response->transaction->processorResponseCode;
49+
}
4750
}
4851

4952
return $result;
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\Catalog\Model\Product;
9+
10+
use Magento\Framework\EntityManager\HydratorInterface;
11+
12+
/**
13+
* Class is used to extract data and populate entity with data
14+
*/
15+
class Hydrator implements HydratorInterface
16+
{
17+
/**
18+
* @inheritdoc
19+
*/
20+
public function extract($entity)
21+
{
22+
return $entity->getData();
23+
}
24+
25+
/**
26+
* @inheritdoc
27+
*/
28+
public function hydrate($entity, array $data)
29+
{
30+
$lockedAttributes = $entity->getLockedAttributes();
31+
$entity->unlockAttributes();
32+
$entity->setData(array_merge($entity->getData(), $data));
33+
foreach ($lockedAttributes as $attribute) {
34+
$entity->lockAttribute($attribute);
35+
}
36+
37+
return $entity;
38+
}
39+
}

app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1595,6 +1595,8 @@ public function addAttributeToFilter($attribute, $condition = null, $joinType =
15951595
} else {
15961596
return parent::addAttributeToFilter($attribute, $condition, $joinType);
15971597
}
1598+
1599+
return $this;
15981600
}
15991601

16001602
/**

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AdminCategoryActionGroup.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,18 @@
191191
<click selector="{{AdminCategorySidebarTreeSection.expandAll}}" stepKey="expandToSeeAllCategories"/>
192192
<dontSee selector="{{AdminCategorySidebarTreeSection.categoryInTree(categoryEntity.name)}}" stepKey="dontSeeCategoryInTree"/>
193193
</actionGroup>
194+
<actionGroup name="AdminDeleteCategoryByName" extends="DeleteCategory">
195+
<arguments>
196+
<argument name="categoryName" type="string" defaultValue="category1"/>
197+
</arguments>
198+
<remove keyForRemoval="clickCategoryLink"/>
199+
<remove keyForRemoval="dontSeeCategoryInTree"/>
200+
<remove keyForRemoval="expandToSeeAllCategories"/>
201+
<conditionalClick selector="{{AdminCategorySidebarTreeSection.expandAll}}" dependentSelector="{{AdminCategorySidebarTreeSection.categoryByName(categoryName)}}" visible="false" stepKey="expandCategories" after="waitForCategoryPageLoad"/>
202+
<click selector="{{AdminCategorySidebarTreeSection.categoryByName(categoryName)}}" stepKey="clickCategory" after="expandCategories"/>
203+
<conditionalClick selector="{{AdminCategorySidebarTreeSection.expandAll}}" dependentSelector="{{AdminCategorySidebarTreeSection.categoryByName(categoryName)}}" visible="false" stepKey="expandCategoriesToSeeAll" after="seeDeleteSuccess"/>
204+
<dontSee selector="{{AdminCategorySidebarTreeSection.categoryByName(categoryName)}}" stepKey="dontSeeCategory" after="expandCategoriesToSeeAll"/>
205+
</actionGroup>
194206

195207
<!-- Actions to fill out a new category from the product page-->
196208
<!-- The action assumes that you are already on an admin product configuration page -->
Lines changed: 19 additions & 0 deletions
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="CatalogPriceScopeWebsiteConfigData">
12+
<data key="path">catalog/price/scope</data>
13+
<data key="value">1</data>
14+
</entity>
15+
<entity name="CatalogPriceScopeGlobalConfigData">
16+
<data key="path">catalog/price/scope</data>
17+
<data key="value">0</data>
18+
</entity>
19+
</entities>

0 commit comments

Comments
 (0)