Skip to content

Commit 8e95bfd

Browse files
committed
Merge remote-tracking branch 'mainline/2.3-develop' into 2.3-developPR21425
2 parents 68ee3af + 61e17e5 commit 8e95bfd

File tree

283 files changed

+8808
-2739
lines changed

Some content is hidden

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

283 files changed

+8808
-2739
lines changed

app/code/Magento/AuthorizenetAcceptjs/etc/payment.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Payment:etc/payment.xsd">
1010
<methods>
1111
<method name="authorizenet_acceptjs">
12-
<allow_multiple_address>1</allow_multiple_address>
12+
<allow_multiple_address>0</allow_multiple_address>
1313
</method>
1414
</methods>
1515
</payment>

app/code/Magento/AuthorizenetAcceptjs/view/base/requirejs-config.js

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

66
var config = {
7-
shim: {
8-
acceptjs: {
9-
exports: 'Accept'
10-
},
11-
acceptjssandbox: {
12-
exports: 'Accept'
7+
map: {
8+
'*': {
9+
acceptjssandbox: 'https://jstest.authorize.net/v1/Accept.js',
10+
acceptjs: 'https://js.authorize.net/v1/Accept.js'
1311
}
14-
},
15-
paths: {
16-
acceptjssandbox: 'https://jstest.authorize.net/v1/Accept',
17-
acceptjs: 'https://js.authorize.net/v1/Accept'
1812
}
1913
};

app/code/Magento/AuthorizenetAcceptjs/view/base/web/js/view/payment/acceptjs-factory.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ define([
1616
dependency = 'acceptjssandbox';
1717
}
1818

19-
require([dependency], function (accept) {
19+
require([dependency], function () {
2020
var $body = $('body');
2121

2222
/*
@@ -26,7 +26,16 @@ define([
2626
* Dynamically-loading-Accept-js-E-WC-03-Accept-js-is-not-loaded/td-p/63283
2727
*/
2828
$body.on('handshake.acceptjs', function () {
29-
deferred.resolve(accept);
29+
/*
30+
* Accept.js doesn't return the library when loading
31+
* and requirejs "shim" can't be used because it only works with the "paths" config option
32+
* and we can't use "paths" because require will try to load ".min.js" in production
33+
* and that doesn't work because it doesn't exist
34+
* and we can't add a query string to force a URL because accept.js will reject it
35+
* and we can't include it locally because they check in the script before loading more scripts
36+
* So, we use the global version as "shim" would
37+
*/
38+
deferred.resolve(window.Accept);
3039
$body.off('handshake.acceptjs');
3140
});
3241
},

app/code/Magento/Backend/Block/Template/Context.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* @api
2020
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
2121
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
22+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
2223
* @since 100.0.2
2324
*/
2425
class Context extends \Magento\Framework\View\Element\Template\Context
@@ -174,7 +175,7 @@ public function getAuthorization()
174175
}
175176

176177
/**
177-
* Get Backend Session
178+
* Get backend session instance.
178179
*
179180
* @return \Magento\Backend\Model\Session
180181
*/
@@ -184,7 +185,7 @@ public function getBackendSession()
184185
}
185186

186187
/**
187-
* Get Math Random
188+
* Get math random instance.
188189
*
189190
* @return \Magento\Framework\Math\Random
190191
*/
@@ -194,7 +195,7 @@ public function getMathRandom()
194195
}
195196

196197
/**
197-
* Get Form Key
198+
* Get form key instance.
198199
*
199200
* @return \Magento\Framework\Data\Form\FormKey
200201
*/
@@ -204,7 +205,7 @@ public function getFormKey()
204205
}
205206

206207
/**
207-
* Get Class Name Builder
208+
* Get name builder instance.
208209
*
209210
* @return \Magento\Framework\Code\NameBuilder
210211
*/

app/code/Magento/Backend/Block/Widget/Grid/Column/Renderer/AbstractRenderer.php

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ abstract class AbstractRenderer extends \Magento\Backend\Block\AbstractBlock imp
2828
protected $_column;
2929

3030
/**
31+
* Set column for renderer.
32+
*
3133
* @param Column $column
3234
* @return $this
3335
*/
@@ -38,6 +40,8 @@ public function setColumn($column)
3840
}
3941

4042
/**
43+
* Returns row associated with the renderer.
44+
*
4145
* @return Column
4246
*/
4347
public function getColumn()
@@ -48,7 +52,7 @@ public function getColumn()
4852
/**
4953
* Renders grid column
5054
*
51-
* @param Object $row
55+
* @param DataObject $row
5256
* @return string
5357
*/
5458
public function render(DataObject $row)
@@ -66,7 +70,7 @@ public function render(DataObject $row)
6670
/**
6771
* Render column for export
6872
*
69-
* @param Object $row
73+
* @param DataObject $row
7074
* @return string
7175
*/
7276
public function renderExport(DataObject $row)
@@ -75,7 +79,9 @@ public function renderExport(DataObject $row)
7579
}
7680

7781
/**
78-
* @param Object $row
82+
* Returns value of the row.
83+
*
84+
* @param DataObject $row
7985
* @return mixed
8086
*/
8187
protected function _getValue(DataObject $row)
@@ -92,7 +98,9 @@ protected function _getValue(DataObject $row)
9298
}
9399

94100
/**
95-
* @param Object $row
101+
* Get pre-rendered input element.
102+
*
103+
* @param DataObject $row
96104
* @return string
97105
*/
98106
public function _getInputValueElement(DataObject $row)
@@ -108,7 +116,9 @@ public function _getInputValueElement(DataObject $row)
108116
}
109117

110118
/**
111-
* @param Object $row
119+
* Get input value by row.
120+
*
121+
* @param DataObject $row
112122
* @return mixed
113123
*/
114124
protected function _getInputValue(DataObject $row)
@@ -117,6 +127,8 @@ protected function _getInputValue(DataObject $row)
117127
}
118128

119129
/**
130+
* Renders header of the column,
131+
*
120132
* @return string
121133
*/
122134
public function renderHeader()
@@ -148,6 +160,8 @@ public function renderHeader()
148160
}
149161

150162
/**
163+
* Render HTML properties.
164+
*
151165
* @return string
152166
*/
153167
public function renderProperty()
@@ -172,6 +186,8 @@ public function renderProperty()
172186
}
173187

174188
/**
189+
* Returns HTML for CSS.
190+
*
175191
* @return string
176192
*/
177193
public function renderCss()

app/code/Magento/Backend/Controller/Adminhtml/Dashboard/ProductsViewed.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,17 @@
66
*/
77
namespace Magento\Backend\Controller\Adminhtml\Dashboard;
88

9-
class ProductsViewed extends AjaxBlock
9+
use Magento\Framework\App\Action\HttpGetActionInterface;
10+
11+
/**
12+
* Get most viewed products controller.
13+
*/
14+
class ProductsViewed extends AjaxBlock implements HttpGetActionInterface
1015
{
1116
/**
1217
* Gets most viewed products list
1318
*
14-
* @return \Magento\Backend\Model\View\Result\Page
19+
* @return \Magento\Framework\Controller\Result\Raw
1520
*/
1621
public function execute()
1722
{

app/code/Magento/Backup/Controller/Adminhtml/Index.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
namespace Magento\Backup\Controller\Adminhtml;
77

88
use Magento\Backend\App\Action;
9-
use Magento\Framework\App\Action\HttpGetActionInterface;
109
use Magento\Backup\Helper\Data as Helper;
1110
use Magento\Framework\App\ObjectManager;
1211

@@ -18,7 +17,7 @@
1817
* @since 100.0.2
1918
* @SuppressWarnings(PHPMD.AllPurposeAction)
2019
*/
21-
abstract class Index extends Action implements HttpGetActionInterface
20+
abstract class Index extends Action
2221
{
2322
/**
2423
* Authorization level of a basic admin session

app/code/Magento/Backup/Controller/Adminhtml/Index/Create.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
<?php
22
/**
3-
*
43
* Copyright © Magento, Inc. All rights reserved.
54
* See COPYING.txt for license details.
65
*/
76
namespace Magento\Backup\Controller\Adminhtml\Index;
87

8+
use Magento\Framework\App\Action\HttpPostActionInterface;
99
use Magento\Framework\App\Filesystem\DirectoryList;
1010
use Magento\Framework\Filesystem;
1111

12-
class Create extends \Magento\Backup\Controller\Adminhtml\Index
12+
/**
13+
* Create backup controller
14+
*/
15+
class Create extends \Magento\Backup\Controller\Adminhtml\Index implements HttpPostActionInterface
1316
{
1417
/**
1518
* Create backup action.

app/code/Magento/Catalog/Controller/Adminhtml/Product/GridOnly.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
<?php
22
/**
3-
*
43
* Copyright © Magento, Inc. All rights reserved.
54
* See COPYING.txt for license details.
65
*/
76
namespace Magento\Catalog\Controller\Adminhtml\Product;
87

9-
class GridOnly extends \Magento\Catalog\Controller\Adminhtml\Product
8+
use Magento\Framework\App\Action\HttpGetActionInterface;
9+
10+
/**
11+
* Get specified tab grid controller.
12+
*/
13+
class GridOnly extends \Magento\Catalog\Controller\Adminhtml\Product implements HttpGetActionInterface
1014
{
1115
/**
1216
* @var \Magento\Framework\Controller\Result\RawFactory
@@ -47,7 +51,7 @@ public function execute()
4751
$this->productBuilder->build($this->getRequest());
4852

4953
$block = $this->getRequest()->getParam('gridOnlyBlock');
50-
$blockClassSuffix = str_replace(' ', '_', ucwords(str_replace('_', ' ', $block)));
54+
$blockClassSuffix = ucwords($block, '_');
5155

5256
/** @var \Magento\Framework\Controller\Result\Raw $resultRaw */
5357
$resultRaw = $this->resultRawFactory->create();

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,4 +263,15 @@
263263
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveCategory"/>
264264
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="assertSuccessMessage"/>
265265
</actionGroup>
266+
267+
<actionGroup name="AdminAssignProductToCategory">
268+
<arguments>
269+
<argument name="productId" type="string"/>
270+
<argument name="categoryName" type="string"/>
271+
</arguments>
272+
<amOnPage url="{{AdminProductEditPage.url(productId)}}" stepKey="amOnPage"/>
273+
<searchAndMultiSelectOption selector="{{AdminProductFormSection.categoriesDropdown}}" parameterArray="[{{categoryName}}]" stepKey="selectCategory"/>
274+
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickOnSaveButton"/>
275+
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the product." stepKey="seeSaveProductMessage"/>
276+
</actionGroup>
266277
</actionGroups>

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

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,4 +148,66 @@
148148
<waitForPageLoad stepKey="waitForAttributeToSave"/>
149149
<seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSuccessMessage"/>
150150
</actionGroup>
151+
152+
<!--Clicks Add Attribute and adds the given attribute-->
153+
<actionGroup name="addProductAttributeInProductModal">
154+
<arguments>
155+
<argument name="attributeCode" type="string"/>
156+
</arguments>
157+
<click stepKey="addAttribute" selector="{{AdminProductFormActionSection.addAttributeButton}}"/>
158+
<conditionalClick selector="{{AdminProductAddAttributeModalSection.clearFilters}}" dependentSelector="{{AdminProductAddAttributeModalSection.clearFilters}}" visible="true" stepKey="clearFilters"/>
159+
<click stepKey="clickFilters" selector="{{AdminProductAddAttributeModalSection.filters}}"/>
160+
<fillField stepKey="fillCode" selector="{{AdminProductAddAttributeModalSection.attributeCodeFilter}}" userInput="{{attributeCode}}"/>
161+
<click stepKey="clickApply" selector="{{AdminProductAddAttributeModalSection.applyFilters}}"/>
162+
<waitForPageLoad stepKey="waitForFilters"/>
163+
<checkOption selector="{{AdminProductAddAttributeModalSection.firstRowCheckBox}}" stepKey="checkAttribute"/>
164+
<click stepKey="addSelected" selector="{{AdminProductAddAttributeModalSection.addSelected}}"/>
165+
</actionGroup>
166+
167+
<!--Clicks createNewAttribute and fills out form-->
168+
<actionGroup name="createProductAttribute">
169+
<arguments>
170+
<argument name="attribute" type="entity" defaultValue="productAttributeWysiwyg"/>
171+
</arguments>
172+
<click stepKey="createNewAttribute" selector="{{AdminProductAttributeGridSection.createNewAttributeBtn}}"/>
173+
<fillField stepKey="fillDefaultLabel" selector="{{AttributePropertiesSection.DefaultLabel}}" userInput="{{attribute.attribute_code}}"/>
174+
<selectOption selector="{{AttributePropertiesSection.InputType}}" stepKey="checkInputType" userInput="{{attribute.frontend_input}}"/>
175+
<selectOption selector="{{AttributePropertiesSection.ValueRequired}}" stepKey="checkRequired" userInput="{{attribute.is_required_admin}}"/>
176+
<click stepKey="saveAttribute" selector="{{AttributePropertiesSection.Save}}"/>
177+
</actionGroup>
178+
179+
<!-- Inputs text default value and attribute code-->
180+
<actionGroup name="createProductAttributeWithTextField" extends="createProductAttribute" insertAfter="checkRequired">
181+
<click stepKey="openAdvancedProperties" selector="{{AdvancedAttributePropertiesSection.AdvancedAttributePropertiesSectionToggle}}"/>
182+
<fillField stepKey="fillCode" selector="{{AdvancedAttributePropertiesSection.AttributeCode}}" userInput="{{attribute.attribute_code}}"/>
183+
<fillField stepKey="fillDefaultValue" selector="{{AdvancedAttributePropertiesSection.DefaultValueText}}" userInput="{{attribute.default_value}}"/>
184+
</actionGroup>
185+
186+
<!-- Inputs date default value and attribute code-->
187+
<actionGroup name="createProductAttributeWithDateField" extends="createProductAttribute" insertAfter="checkRequired">
188+
<arguments>
189+
<argument name="date" type="string"/>
190+
</arguments>
191+
<click stepKey="openAdvancedProperties" selector="{{AdvancedAttributePropertiesSection.AdvancedAttributePropertiesSectionToggle}}"/>
192+
<fillField stepKey="fillCode" selector="{{AdvancedAttributePropertiesSection.AttributeCode}}" userInput="{{attribute.attribute_code}}"/>
193+
<fillField stepKey="fillDefaultValue" selector="{{AdvancedAttributePropertiesSection.DefaultValueDate}}" userInput="{{date}}"/>
194+
</actionGroup>
195+
196+
<!-- Creates dropdown option at row without saving-->
197+
<actionGroup name="createAttributeDropdownNthOption">
198+
<arguments>
199+
<argument name="row" type="string"/>
200+
<argument name="adminName" type="string"/>
201+
<argument name="frontName" type="string"/>
202+
</arguments>
203+
<click stepKey="clickAddOptions" selector="{{AttributePropertiesSection.dropdownAddOptions}}"/>
204+
<waitForPageLoad stepKey="waitForNewOption"/>
205+
<fillField stepKey="fillAdmin" selector="{{AttributePropertiesSection.dropdownNthOptionAdmin(row)}}" userInput="{{adminName}}"/>
206+
<fillField stepKey="fillStoreView" selector="{{AttributePropertiesSection.dropdownNthOptionDefaultStoreView(row)}}" userInput="{{frontName}}"/>
207+
</actionGroup>
208+
209+
<!-- Creates dropdown option at row as default-->
210+
<actionGroup name="createAttributeDropdownNthOptionAsDefault" extends="createAttributeDropdownNthOption">
211+
<checkOption selector="{{AttributePropertiesSection.dropdownNthOptionIsDefault(row)}}" stepKey="setAsDefault" after="fillStoreView"/>
212+
</actionGroup>
151213
</actionGroups>

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,14 @@
6464
<waitForPageLoad stepKey="waitForUserInput"/>
6565
<click selector="{{AdminProductAttributeGridSection.Search}}" stepKey="searchForAttributeFromTheGrid"/>
6666
</actionGroup>
67+
<actionGroup name="FilterProductAttributeSetGridByAttributeSetName">
68+
<arguments>
69+
<argument name="name" type="string"/>
70+
</arguments>
71+
<click selector="{{AdminProductAttributeSetGridSection.resetFilter}}" stepKey="clickResetButton"/>
72+
<fillField selector="{{AdminProductAttributeSetGridSection.filter}}" userInput="{{name}}" stepKey="filterByName"/>
73+
<click selector="{{AdminProductAttributeSetGridSection.searchBtn}}" stepKey="clickSearch"/>
74+
<click selector="{{AdminProductAttributeSetGridSection.nthRow('1')}}" stepKey="clickFirstRow"/>
75+
<waitForPageLoad time="30" stepKey="waitForPageLoad1"/>
76+
</actionGroup>
6777
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Data/CategoryData.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,10 @@
104104
<data key="is_active">false</data>
105105
<data key="include_in_menu">true</data>
106106
</entity>
107+
<entity name="CatInactiveNotInMenu" type="category">
108+
<data key="name" unique="suffix">InactiveNotInMenu</data>
109+
<data key="name_lwr" unique="suffix">inactivenotinmenu</data>
110+
<data key="is_active">false</data>
111+
<data key="include_in_menu">false</data>
112+
</entity>
107113
</entities>

0 commit comments

Comments
 (0)