Skip to content

Commit 00a00fd

Browse files
committed
Merge remote-tracking branch 'magento2/2.3-develop' into MC-21756
2 parents 0861a30 + 99f206f commit 00a00fd

File tree

104 files changed

+2008
-675
lines changed

Some content is hidden

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

104 files changed

+2008
-675
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/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/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>

app/code/Magento/Catalog/Test/Mftf/Section/AdminCategorySidebarTreeSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,6 @@
1919
<element name="lastCreatedCategory" type="block" selector=".x-tree-root-ct li li:last-child" />
2020
<element name="treeContainer" type="block" selector=".tree-holder" />
2121
<element name="expandRootCategory" type="text" selector="img.x-tree-elbow-end-plus"/>
22+
<element name="categoryByName" type="text" selector="//div[contains(@class, 'categories-side-col')]//a/span[contains(text(), '{{categoryName}}')]" parameterized="true" timeout="30"/>
2223
</section>
2324
</sections>

app/code/Magento/Catalog/Test/Mftf/Section/AdminProductFormSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1010
<section name="AdminProductFormSection">
11+
<element name="datepickerNewAttribute" type="input" selector="[data-index='{{attrName}}'] input" timeout="30" parameterized="true"/>
1112
<element name="attributeSet" type="select" selector="div[data-index='attribute_set_id'] .admin__field-control"/>
1213
<element name="attributeSetFilter" type="input" selector="div[data-index='attribute_set_id'] .admin__field-control input" timeout="30"/>
1314
<element name="attributeSetFilterResult" type="input" selector="div[data-index='attribute_set_id'] .action-menu-item._last" timeout="30"/>
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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\Ui\DataProvider\Product\Modifier;
9+
10+
use Magento\Framework\Escaper;
11+
use Magento\Ui\DataProvider\Modifier\ModifierInterface;
12+
13+
/**
14+
* Modify product listing attributes
15+
*/
16+
class Attributes implements ModifierInterface
17+
{
18+
/**
19+
* @var Escaper
20+
*/
21+
private $escaper;
22+
23+
/**
24+
* @var array
25+
*/
26+
private $escapeAttributes;
27+
28+
/**
29+
* @param Escaper $escaper
30+
* @param array $escapeAttributes
31+
*/
32+
public function __construct(
33+
Escaper $escaper,
34+
array $escapeAttributes = []
35+
) {
36+
$this->escaper = $escaper;
37+
$this->escapeAttributes = $escapeAttributes;
38+
}
39+
40+
/**
41+
* @inheritdoc
42+
*/
43+
public function modifyData(array $data)
44+
{
45+
if (!empty($data) && !empty($this->escapeAttributes)) {
46+
foreach ($data['items'] as &$item) {
47+
foreach ($this->escapeAttributes as $escapeAttribute) {
48+
if (isset($item[$escapeAttribute])) {
49+
$item[$escapeAttribute] = $this->escaper->escapeHtml($item[$escapeAttribute]);
50+
}
51+
}
52+
}
53+
}
54+
return $data;
55+
}
56+
57+
/**
58+
* @inheritdoc
59+
*/
60+
public function modifyMeta(array $meta)
61+
{
62+
return $meta;
63+
}
64+
}

app/code/Magento/Catalog/etc/adminhtml/di.xml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,24 @@
166166
<argument name="pool" xsi:type="object">Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\Pool</argument>
167167
</arguments>
168168
</type>
169-
<virtualType name="Magento\Catalog\Ui\DataProvider\Product\Listing\Modifier\Pool" type="Magento\Ui\DataProvider\Modifier\Pool"/>
169+
<virtualType name="Magento\Catalog\Ui\DataProvider\Product\Listing\Modifier\Pool" type="Magento\Ui\DataProvider\Modifier\Pool">
170+
<arguments>
171+
<argument name="modifiers" xsi:type="array">
172+
<item name="attributes" xsi:type="array">
173+
<item name="class" xsi:type="string">Magento\Catalog\Ui\DataProvider\Product\Modifier\Attributes</item>
174+
<item name="sortOrder" xsi:type="number">10</item>
175+
</item>
176+
</argument>
177+
</arguments>
178+
</virtualType>
179+
<type name="Magento\Catalog\Ui\DataProvider\Product\Modifier\Attributes">
180+
<arguments>
181+
<argument name="escapeAttributes" xsi:type="array">
182+
<item name="name" xsi:type="string">name</item>
183+
<item name="sku" xsi:type="string">sku</item>
184+
</argument>
185+
</arguments>
186+
</type>
170187
<type name="Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\CustomOptions">
171188
<arguments>
172189
<argument name="scopeName" xsi:type="string">product_form.product_form</argument>

0 commit comments

Comments
 (0)