Skip to content

Commit 32ba268

Browse files
author
Magento CICD
authored
merge magento/2.3-develop into magento-borg/MAGETWO-91710
2 parents 0c01f79 + 53241b9 commit 32ba268

File tree

152 files changed

+3619
-881
lines changed

Some content is hidden

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

152 files changed

+3619
-881
lines changed

app/code/Magento/AdvancedPricingImportExport/Model/Export/AdvancedPricing.php

+4-3
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ class AdvancedPricing extends \Magento\CatalogImportExport\Model\Export\Product
104104
* @param \Magento\CatalogImportExport\Model\Export\RowCustomizerInterface $rowCustomizer
105105
* @param ImportProduct\StoreResolver $storeResolver
106106
* @param \Magento\Customer\Api\GroupRepositoryInterface $groupRepository
107-
* @throws \Magento\Framework\Exception\LocalizedException
108107
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
109108
*/
110109
public function __construct(
@@ -193,6 +192,7 @@ protected function initTypeModels()
193192
* Export process
194193
*
195194
* @return string
195+
* @throws \Magento\Framework\Exception\LocalizedException
196196
*/
197197
public function export()
198198
{
@@ -586,8 +586,8 @@ protected function getTierPrices(array $listSku, $table)
586586
* Get Website code.
587587
*
588588
* @param int $websiteId
589-
*
590589
* @return string
590+
* @throws \Magento\Framework\Exception\LocalizedException
591591
*/
592592
protected function _getWebsiteCode(int $websiteId): string
593593
{
@@ -617,8 +617,9 @@ protected function _getWebsiteCode(int $websiteId): string
617617
*
618618
* @param int $groupId
619619
* @param int $allGroups
620-
*
621620
* @return string
621+
* @throws \Magento\Framework\Exception\LocalizedException
622+
* @throws \Magento\Framework\Exception\NoSuchEntityException
622623
*/
623624
protected function _getCustomerGroupById(
624625
int $groupId,

app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
use Magento\CatalogImportExport\Model\Import\Product as ImportProduct;
99
use Magento\CatalogImportExport\Model\Import\Product\RowValidatorInterface as ValidatorInterface;
1010
use Magento\ImportExport\Model\Import\ErrorProcessing\ProcessingErrorAggregatorInterface;
11-
use Magento\Framework\App\ResourceConnection;
1211

1312
/**
1413
* Class AdvancedPricing
@@ -618,6 +617,7 @@ protected function processCountNewPrices(array $tierPrices)
618617
* Get product entity link field
619618
*
620619
* @return string
620+
* @throws \Exception
621621
*/
622622
private function getProductEntityLinkField()
623623
{

app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing/Validator.php

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public function __construct($validators = [])
2828
*
2929
* @param array $value
3030
* @return bool
31+
* @throws \Zend_Validate_Exception
3132
*/
3233
public function isValid($value)
3334
{

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Export/AdvancedPricingTest.php

+16-7
Original file line numberDiff line numberDiff line change
@@ -151,10 +151,13 @@ protected function setUp()
151151
]
152152
);
153153
$this->exportConfig = $this->createMock(\Magento\ImportExport\Model\Export\Config::class);
154-
$this->productFactory = $this->createPartialMock(\Magento\Catalog\Model\ResourceModel\ProductFactory::class, [
154+
$this->productFactory = $this->createPartialMock(
155+
\Magento\Catalog\Model\ResourceModel\ProductFactory::class,
156+
[
155157
'create',
156158
'getTypeId',
157-
]);
159+
]
160+
);
158161
$this->attrSetColFactory = $this->createPartialMock(
159162
\Magento\Eav\Model\ResourceModel\Entity\Attribute\Set\CollectionFactory::class,
160163
[
@@ -185,11 +188,14 @@ protected function setUp()
185188
\Magento\CatalogImportExport\Model\Import\Product\StoreResolver::class
186189
);
187190
$this->groupRepository = $this->createMock(\Magento\Customer\Api\GroupRepositoryInterface::class);
188-
$this->writer = $this->createPartialMock(\Magento\ImportExport\Model\Export\Adapter\AbstractAdapter::class, [
189-
'setHeaderCols',
190-
'writeRow',
191-
'getContents',
192-
]);
191+
$this->writer = $this->createPartialMock(
192+
\Magento\ImportExport\Model\Export\Adapter\AbstractAdapter::class,
193+
[
194+
'setHeaderCols',
195+
'writeRow',
196+
'getContents',
197+
]
198+
);
193199
$constructorMethods = [
194200
'initTypeModels',
195201
'initAttributes',
@@ -347,6 +353,7 @@ protected function tearDown()
347353
* @param $object
348354
* @param $property
349355
* @return mixed
356+
* @throws \ReflectionException
350357
*/
351358
protected function getPropertyValue($object, $property)
352359
{
@@ -362,6 +369,8 @@ protected function getPropertyValue($object, $property)
362369
* @param $object
363370
* @param $property
364371
* @param $value
372+
* @return mixed
373+
* @throws \ReflectionException
365374
*/
366375
protected function setPropertyValue(&$object, $property, $value)
367376
{

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/TierPriceTest.php

+2
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ public function isValidAddMessagesCallDataProvider()
346346
* @param object $object
347347
* @param string $property
348348
* @return mixed
349+
* @throws \ReflectionException
349350
*/
350351
protected function getPropertyValue($object, $property)
351352
{
@@ -363,6 +364,7 @@ protected function getPropertyValue($object, $property)
363364
* @param string $property
364365
* @param mixed $value
365366
* @return object
367+
* @throws \ReflectionException
366368
*/
367369
protected function setPropertyValue(&$object, $property, $value)
368370
{

app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricingTest.php

+21-2
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,10 @@ public function testGetEntityTypeCode()
209209
* Test method validateRow against its result.
210210
*
211211
* @dataProvider validateRowResultDataProvider
212+
* @param array $rowData
213+
* @param string|null $behavior
214+
* @param bool $expectedResult
215+
* @throws \ReflectionException
212216
*/
213217
public function testValidateRowResult($rowData, $behavior, $expectedResult)
214218
{
@@ -234,6 +238,10 @@ public function testValidateRowResult($rowData, $behavior, $expectedResult)
234238
* Test method validateRow whether AddRowError is called.
235239
*
236240
* @dataProvider validateRowAddRowErrorCallDataProvider
241+
* @param array $rowData
242+
* @param string|null $behavior
243+
* @param string $error
244+
* @throws \ReflectionException
237245
*/
238246
public function testValidateRowAddRowErrorCall($rowData, $behavior, $error)
239247
{
@@ -324,6 +332,13 @@ public function testSaveAdvancedPricing()
324332
* Take into consideration different data and check relative internal calls.
325333
*
326334
* @dataProvider saveAndReplaceAdvancedPricesAppendBehaviourDataProvider
335+
* @param array $data
336+
* @param string $tierCustomerGroupId
337+
* @param string $groupCustomerGroupId
338+
* @param string $tierWebsiteId
339+
* @param string $groupWebsiteId
340+
* @param array $expectedTierPrices
341+
* @throws \ReflectionException
327342
*/
328343
public function testSaveAndReplaceAdvancedPricesAppendBehaviourDataAndCalls(
329344
$data,
@@ -956,6 +971,7 @@ public function processCountExistingPricesDataProvider()
956971
* @param $object
957972
* @param $property
958973
* @return mixed
974+
* @throws \ReflectionException
959975
*/
960976
protected function getPropertyValue($object, $property)
961977
{
@@ -972,6 +988,8 @@ protected function getPropertyValue($object, $property)
972988
* @param $object
973989
* @param $property
974990
* @param $value
991+
* @return mixed
992+
* @throws \ReflectionException
975993
*/
976994
protected function setPropertyValue(&$object, $property, $value)
977995
{
@@ -989,8 +1007,8 @@ protected function setPropertyValue(&$object, $property, $value)
9891007
* @param object $object
9901008
* @param string $method
9911009
* @param array $args
992-
*
993-
* @return mixed the method result.
1010+
* @return mixed
1011+
* @throws \ReflectionException
9941012
*/
9951013
private function invokeMethod($object, $method, $args = [])
9961014
{
@@ -1007,6 +1025,7 @@ private function invokeMethod($object, $method, $args = [])
10071025
* @param array $methods
10081026
*
10091027
* @return \PHPUnit_Framework_MockObject_MockObject
1028+
* @throws \ReflectionException
10101029
*/
10111030
private function getAdvancedPricingMock($methods = [])
10121031
{

app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationTimeToSendDataTest.xml

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
</after>
2424
<actionGroup ref="LoginActionGroup" stepKey="loginAsAdmin"/>
2525
<amOnPage stepKey="amOnAdminConfig" url="{{AdminConfigPage.url}}"/>
26+
<waitForPageLoad stepKey="waitForAdminConfig"/>
2627
<click stepKey="clickAdvancedReportingConfigMenu" selector="{{AdminConfigSection.advancedReportingMenuItem}}"/>
2728
<selectOption stepKey="selectAdvancedReportingIndustry" selector="{{AdminConfigSection.advancedReportingIndustry}}" userInput="Apps and Games"/>
2829
<selectOption stepKey="selectAdvancedReportingHour" selector="{{AdminConfigSection.advancedReportingHour}}" userInput="11"/>

app/code/Magento/Analytics/Test/Unit/ReportXml/DB/ReportValidatorTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ protected function setUp()
7979
* @dataProvider errorDataProvider
8080
* @param string $reportName
8181
* @param array $result
82-
* @param \PHPUnit_Framework_MockObject_Stub $queryReturnStub
82+
* @param \PHPUnit\Framework\MockObject\Stub $queryReturnStub
8383
*/
84-
public function testValidate($reportName, $result, \PHPUnit_Framework_MockObject_Stub $queryReturnStub)
84+
public function testValidate($reportName, $result, \PHPUnit\Framework\MockObject\Stub $queryReturnStub)
8585
{
8686
$connectionName = 'testConnection';
8787
$this->queryFactoryMock->expects($this->once())

app/code/Magento/Backend/Test/Mftf/Section/AdminMessagesSection.xml

+1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
1111
<section name="AdminMessagesSection">
1212
<element name="success" type="text" selector="#messages div.message-success"/>
13+
<element name="nthSuccess" type="text" selector=".message.message-success.success:nth-of-type({{n}})>div" parameterized="true"/>
1314
</section>
1415
</sections>

app/code/Magento/Backend/Test/Mftf/Section/AdminSecondaryGridSection.xml

+2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@
1111
<section name="AdminSecondaryGridSection">
1212
<element name="resetFilters" type="button" selector="[title='Reset Filter']"/>
1313
<element name="taxIdentifierSearch" type="input" selector=".col-code .admin__control-text"/>
14+
<element name="catalogRuleIdentifierSearch" type="input" selector=".col-name .admin__control-text"/>
1415
<element name="searchButton" type="input" selector=".admin__filter-actions [title='Search']"/>
1516
<element name="firstRow" type="block" selector="tr[data-role='row']"/>
1617
</section>
1718
</sections>
19+

app/code/Magento/Backend/etc/adminhtml/system.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@
432432
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
433433
<backend_model>Magento\Config\Model\Config\Backend\Store</backend_model>
434434
<comment>
435-
<![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.).]]>
435+
<![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.).]]>
436436
</comment>
437437
</field>
438438
<field id="redirect_to_base" translate="label" type="select" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1" canRestore="1">

app/code/Magento/Backend/i18n/en_US.csv

+3-3
Original file line numberDiff line numberDiff line change
@@ -405,9 +405,9 @@ Web,Web
405405
"Url Options","Url Options"
406406
"Add Store Code to Urls","Add Store Code to Urls"
407407
"
408-
<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.).
408+
<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.).
409409
","
410-
<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.).
410+
<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.).
411411
"
412412
"Auto-redirect to Base URL","Auto-redirect to Base URL"
413413
"Search Engine Optimization","Search Engine Optimization"
@@ -447,7 +447,7 @@ Tags,Tags
447447
"<h1 class=""page-heading"">404 Error</h1><p>Page not found.</p>","<h1 class=""page-heading"">404 Error</h1><p>Page not found.</p>"
448448
"Community Edition","Community Edition"
449449
"Default Theme","Default Theme"
450-
"If no value is specified, the system default is used. The system default may be modified by third party extensions.","If no value is specified, the system default is used. The system default may be modified by third party extensions."
450+
"If no value is specified, the system default is used. The system default may be modified by third-party extensions.","If no value is specified, the system default is used. The system default may be modified by third-party extensions."
451451
"Applied Theme","Applied Theme"
452452
"Design Rule","Design Rule"
453453
"User Agent Rules","User Agent Rules"

app/code/Magento/Backend/view/adminhtml/ui_component/design_config_form.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</settings>
1313
<field name="theme_theme_id" sortOrder="10" formElement="select">
1414
<settings>
15-
<notice translate="true">If no value is specified, the system default is used. The system default may be modified by third party extensions.</notice>
15+
<notice translate="true">If no value is specified, the system default is used. The system default may be modified by third-party extensions.</notice>
1616
<dataType>text</dataType>
1717
<label translate="true">Applied Theme</label>
1818
<dataScope>theme_theme_id</dataScope>

app/code/Magento/Braintree/composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
},
77
"require": {
88
"php": "~7.1.3||~7.2.0",
9-
"braintree/braintree_php": "3.28.0",
9+
"braintree/braintree_php": "3.34.0",
1010
"magento/framework": "*",
1111
"magento/magento-composer-installer": "*",
1212
"magento/module-catalog": "*",

app/code/Magento/Bundle/Model/Product/Type.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -534,12 +534,12 @@ public function updateQtyOption($options, \Magento\Framework\DataObject $option,
534534

535535
foreach ($selections as $selection) {
536536
if ($selection->getProductId() == $optionProduct->getId()) {
537-
foreach ($options as &$option) {
538-
if ($option->getCode() == 'selection_qty_' . $selection->getSelectionId()) {
537+
foreach ($options as $quoteItemOption) {
538+
if ($quoteItemOption->getCode() == 'selection_qty_' . $selection->getSelectionId()) {
539539
if ($optionUpdateFlag) {
540-
$option->setValue(intval($option->getValue()));
540+
$quoteItemOption->setValue(intval($quoteItemOption->getValue()));
541541
} else {
542-
$option->setValue($value);
542+
$quoteItemOption->setValue($value);
543543
}
544544
}
545545
}

app/code/Magento/Bundle/Test/Mftf/ActionGroup/CreateBundleProductActionGroup.xml

+34
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,38 @@
2121
<!--Fill URL input-->
2222
<fillField userInput="{{BundleProduct.urlKey}}" selector="{{AdminProductFormBundleSection.urlKey}}" stepKey="FillsinSEOlinkExtension"/>
2323
</actionGroup>
24+
25+
<actionGroup name="addBundleOptionWithTwoProducts">
26+
<arguments>
27+
<argument name="x" type="string"/>
28+
<argument name="n" type="string"/>
29+
<argument name="prodOneSku" type="string"/>
30+
<argument name="prodTwoSku" type="string"/>
31+
<argument name="optionTitle" type="string"/>
32+
<argument name="inputType" type="string"/>
33+
</arguments>
34+
<conditionalClick selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" dependentSelector="{{AdminProductFormBundleSection.bundleItemsToggle}}" visible="false" stepKey="conditionallyOpenSectionBundleItems"/>
35+
<scrollTo selector="{{AdminProductFormBundleSection.bundleItemsToggle}}" stepKey="scrollUpABit"/>
36+
<click selector="{{AdminProductFormBundleSection.addOption}}" stepKey="clickAddOption"/>
37+
<waitForElementVisible selector="{{AdminProductFormBundleSection.bundleOptionXTitle(x)}}" stepKey="waitForOptions"/>
38+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXTitle(x)}}" userInput="{{optionTitle}}" stepKey="fillTitle"/>
39+
<selectOption selector="{{AdminProductFormBundleSection.bundleOptionXInputType(x)}}" userInput="{{inputType}}" stepKey="selectType"/>
40+
<waitForElementVisible selector="{{AdminProductFormBundleSection.nthAddProductsToOption(n)}}" stepKey="waitForAddBtn"/>
41+
<click selector="{{AdminProductFormBundleSection.nthAddProductsToOption(n)}}" stepKey="clickAdd"/>
42+
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFilters1"/>
43+
<click selector="{{AdminProductGridFilterSection.filters}}" stepKey="openProductFilters1"/>
44+
<fillField selector="{{AdminProductGridFilterSection.skuFilter}}" userInput="{{prodOneSku}}" stepKey="fillProductSkuFilter1"/>
45+
<click selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="clickApplyFilters1"/>
46+
<waitForElementNotVisible selector="{{AdminProductGridSection.loadingMask}}" stepKey="waitForFilteredGridLoad1" time="30"/>
47+
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectProduct1"/>
48+
<conditionalClick selector="{{AdminProductGridFilterSection.clearFilters}}" dependentSelector="{{AdminProductGridFilterSection.clearFilters}}" visible="true" stepKey="clickClearFilters2"/>
49+
<click selector="{{AdminProductGridFilterSection.filters}}" stepKey="openProductFilters2"/>
50+
<fillField selector="{{AdminProductGridFilterSection.skuFilter}}" userInput="{{prodTwoSku}}" stepKey="fillProductSkuFilter2"/>
51+
<click selector="{{AdminProductGridFilterSection.applyFilters}}" stepKey="clickApplyFilters2"/>
52+
<waitForElementNotVisible selector="{{AdminProductGridSection.loadingMask}}" stepKey="waitForFilteredGridLoad2" time="30"/>
53+
<checkOption selector="{{AdminAddProductsToOptionPanel.firstCheckbox}}" stepKey="selectProduct2"/>
54+
<click selector="{{AdminAddProductsToOptionPanel.addSelectedProducts}}" stepKey="clickAddButton1"/>
55+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity(x, '0')}}" userInput="50" stepKey="fillQuantity1"/>
56+
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity(x, '1')}}" userInput="50" stepKey="fillQuantity2"/>
57+
</actionGroup>
2458
</actionGroups>

app/code/Magento/Bundle/Test/Mftf/Data/ProductData.xml

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
<data key="default_quantity2">20</data>
2727
<data key="set">4</data>
2828
<data key="type">bundle</data>
29+
<data key="price">10</data>
2930
<data key="fixedPrice">10</data>
3031
<data key="fixedPriceFormatted">$10.00</data>
3132
<data key="defaultAttribute">Default</data>

0 commit comments

Comments
 (0)