Skip to content

Commit 60185d1

Browse files
committed
Merge branch '2.3-develop' into MAGETWO-58764
2 parents d04482c + 9afd4c6 commit 60185d1

File tree

239 files changed

+7427
-1332
lines changed

Some content is hidden

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

239 files changed

+7427
-1332
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/Model/Session/Quote.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* @method Quote setOrderId($orderId)
2525
* @method int getOrderId()
2626
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
27+
* @SuppressWarnings(PHPMD.CookieAndSessionMisuse)
2728
* @since 100.0.2
2829
*/
2930
class Quote extends \Magento\Framework\Session\SessionManager
@@ -149,7 +150,8 @@ public function getQuote()
149150
$this->_quote = $this->quoteFactory->create();
150151
if ($this->getStoreId()) {
151152
if (!$this->getQuoteId()) {
152-
$this->_quote->setCustomerGroupId($this->groupManagement->getDefaultGroup()->getId());
153+
$customerGroupId = $this->groupManagement->getDefaultGroup($this->getStoreId())->getId();
154+
$this->_quote->setCustomerGroupId($customerGroupId);
153155
$this->_quote->setIsActive(false);
154156
$this->_quote->setStoreId($this->getStoreId());
155157

app/code/Magento/Backend/Test/Unit/Model/Session/QuoteTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,10 @@ public function testGetQuoteWithoutQuoteId()
267267
$cartInterfaceMock->expects($this->atLeastOnce())->method('getId')->willReturn($quoteId);
268268
$defaultGroup = $this->getMockBuilder(\Magento\Customer\Api\Data\GroupInterface::class)->getMock();
269269
$defaultGroup->expects($this->any())->method('getId')->will($this->returnValue($customerGroupId));
270-
$this->groupManagementMock->expects($this->any())->method('getDefaultGroup')->willReturn($defaultGroup);
270+
$this->groupManagementMock
271+
->method('getDefaultGroup')
272+
->with($storeId)
273+
->willReturn($defaultGroup);
271274

272275
$dataCustomerMock = $this->getMockBuilder(\Magento\Customer\Api\Data\CustomerInterface::class)
273276
->disableOriginalConstructor()

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>

0 commit comments

Comments
 (0)