Skip to content

Commit f20fb6d

Browse files
Merge 2.3-develop into 2.3.6-develop
2 parents 2b09f1d + 6702be5 commit f20fb6d

File tree

14 files changed

+96
-32
lines changed

14 files changed

+96
-32
lines changed

app/code/Magento/Checkout/view/frontend/web/js/region-updater.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ define([
5656
if (this.options.isMultipleCountriesAllowed) {
5757
this.element.parents('div.field').show();
5858
this.element.on('change', $.proxy(function (e) {
59+
// clear region inputs on country change
60+
$(this.options.regionListId).val('');
61+
$(this.options.regionInputId).val('');
5962
this._updateRegion($(e.target).val());
6063
}, this));
6164

@@ -165,9 +168,6 @@ define([
165168
this._clearError();
166169
this._checkRegionRequired(country);
167170

168-
$(regionList).find('option:selected').removeAttr('selected');
169-
regionInput.val('');
170-
171171
// Populate state/province dropdown list if available or use input box
172172
if (this.options.regionJson[country]) {
173173
this._removeSelectOptions(regionList);

app/code/Magento/Paypal/Model/AbstractConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ abstract class AbstractConfig implements ConfigInterface
5858
/**
5959
* @var string
6060
*/
61-
private static $bnCode = 'Magento_Cart_%s';
61+
private static $bnCode = 'Magento_2_%s';
6262

6363
/**
6464
* @var \Magento\Framework\App\Config\ScopeConfigInterface

app/code/Magento/Paypal/Test/Unit/Model/AbstractConfigTest.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@
1212
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager as ObjectManagerHelper;
1313

1414
/**
15-
* Class AbstractConfigTest
16-
* @package Magento\Paypal\Test\Unit\Model
15+
* Test for \Magento\Framework\App\Config\ScopeConfigInterface
1716
*/
1817
class AbstractConfigTest extends \PHPUnit\Framework\TestCase
1918
{
@@ -30,7 +29,7 @@ class AbstractConfigTest extends \PHPUnit\Framework\TestCase
3029

3130
protected function setUp()
3231
{
33-
$this->scopeConfigMock = $this->getMockBuilder(\Magento\Framework\App\Config\ScopeConfigInterface::class)
32+
$this->scopeConfigMock = $this->getMockBuilder(ScopeConfigInterface::class)
3433
->setMethods(['getValue', 'isSetFlag'])
3534
->getMockForAbstractClass();
3635

@@ -51,7 +50,7 @@ public function testSetMethod($method, $expected)
5150
public function testSetMethodInstance()
5251
{
5352
/** @var $methodInterfaceMock MethodInterface */
54-
$methodInterfaceMock = $this->getMockBuilder(\Magento\Payment\Model\MethodInterface::class)
53+
$methodInterfaceMock = $this->getMockBuilder(MethodInterface::class)
5554
->getMockForAbstractClass();
5655
$this->assertSame($this->config, $this->config->setMethodInstance($methodInterfaceMock));
5756
}
@@ -66,7 +65,7 @@ public function testSetMethodInstance()
6665
public function setMethodDataProvider()
6766
{
6867
/** @var $methodInterfaceMock MethodInterface */
69-
$methodInterfaceMock = $this->getMockBuilder(\Magento\Payment\Model\MethodInterface::class)
68+
$methodInterfaceMock = $this->getMockBuilder(MethodInterface::class)
7069
->getMockForAbstractClass();
7170
$methodInterfaceMock->expects($this->once())
7271
->method('getCode')
@@ -353,7 +352,7 @@ public function testGetBuildNotationCode()
353352
$productMetadata
354353
);
355354

356-
self::assertEquals('Magento_Cart_SomeEdition', $this->config->getBuildNotationCode());
355+
self::assertEquals('Magento_2_SomeEdition', $this->config->getBuildNotationCode());
357356
}
358357

359358
/**

app/code/Magento/Sales/Controller/Adminhtml/Order/AddComment.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
/**
1212
* Class AddComment
13+
*
14+
* Controller responsible for addition of the order comment to the order
1315
*/
1416
class AddComment extends \Magento\Sales\Controller\Adminhtml\Order implements HttpPostActionInterface
1517
{
@@ -42,6 +44,7 @@ public function execute()
4244
);
4345
}
4446

47+
$order->setStatus($data['status']);
4548
$notify = $data['is_customer_notified'] ?? false;
4649
$visible = $data['is_visible_on_front'] ?? false;
4750

app/code/Magento/Sales/Model/Order/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class Config
5252
*/
5353
protected $maskStatusesMapping = [
5454
\Magento\Framework\App\Area::AREA_FRONTEND => [
55-
\Magento\Sales\Model\Order::STATUS_FRAUD => \Magento\Sales\Model\Order::STATE_PROCESSING,
55+
\Magento\Sales\Model\Order::STATUS_FRAUD => \Magento\Sales\Model\Order::STATUS_FRAUD,
5656
\Magento\Sales\Model\Order::STATE_PAYMENT_REVIEW => \Magento\Sales\Model\Order::STATE_PROCESSING
5757
]
5858
];

dev/tests/integration/testsuite/Magento/Framework/Image/Adapter/InterfaceTest.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,17 +108,18 @@ protected function _isFormatSupported($image, $adapter)
108108
* Mark test as skipped if not
109109
*
110110
* @param string $adapterType
111-
* @return \Magento\Framework\Image\Adapter\AdapterInterface
111+
* @return \Magento\Framework\Image\Adapter\AdapterInterface|null
112112
*/
113113
protected function _getAdapter($adapterType)
114114
{
115+
$adapter = null;
115116
try {
116117
$objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
117118
$adapter = $objectManager->get(\Magento\Framework\Image\AdapterFactory::class)->create($adapterType);
118-
return $adapter;
119119
} catch (\Exception $e) {
120120
$this->markTestSkipped($e->getMessage());
121121
}
122+
return $adapter;
122123
}
123124

124125
/**
@@ -667,7 +668,7 @@ public function createPngFromStringDataProvider()
667668
[
668669
['x' => 5, 'y' => 8],
669670
'expectedColor1' => ['red' => 0, 'green' => 0, 'blue' => 0],
670-
['x' => 0, 'y' => 14],
671+
['x' => 0, 'y' => 11],
671672
'expectedColor2' => ['red' => 255, 'green' => 255, 'blue' => 255],
672673
\Magento\Framework\Image\Adapter\AdapterInterface::ADAPTER_GD2,
673674
],
@@ -679,9 +680,9 @@ public function createPngFromStringDataProvider()
679680
\Magento\Framework\Image\Adapter\AdapterInterface::ADAPTER_IM
680681
],
681682
[
682-
['x' => 1, 'y' => 14],
683+
['x' => 1, 'y' => 11],
683684
'expectedColor1' => ['red' => 255, 'green' => 255, 'blue' => 255],
684-
['x' => 5, 'y' => 12],
685+
['x' => 5, 'y' => 11],
685686
'expectedColor2' => ['red' => 0, 'green' => 0, 'blue' => 0],
686687
\Magento\Framework\Image\Adapter\AdapterInterface::ADAPTER_GD2
687688
],

dev/tests/integration/testsuite/Magento/Paypal/Model/Api/NvpTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function testRequestTotalsAndLineItemsWithFPT()
9595
. '&SHIPPINGAMT=0.00&ITEMAMT=112.70&TAXAMT=0.00'
9696
. '&L_NAME0=Simple+Product+FPT&L_QTY0=1&L_AMT0=100.00'
9797
. '&L_NAME1=FPT&L_QTY1=1&L_AMT1=12.70'
98-
. '&METHOD=SetExpressCheckout&VERSION=72.0&BUTTONSOURCE=Magento_Cart_';
98+
. '&METHOD=SetExpressCheckout&VERSION=72.0&BUTTONSOURCE=Magento_2_';
9999

100100
$this->httpClient->method('write')
101101
->with(
@@ -146,7 +146,7 @@ public function testCallRefundTransaction()
146146

147147
$httpQuery = 'TRANSACTIONID=fooTransactionId&REFUNDTYPE=Partial'
148148
.'&CURRENCYCODE=USD&AMT=145.98&METHOD=RefundTransaction'
149-
.'&VERSION=72.0&BUTTONSOURCE=Magento_Cart_';
149+
.'&VERSION=72.0&BUTTONSOURCE=Magento_2_';
150150

151151
$this->httpClient->expects($this->once())->method('write')
152152
->with(

dev/tests/integration/testsuite/Magento/Paypal/Model/Api/PayflowNvpTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function testRequestLineItems()
9595
. 'L_NAME1=Simple 2&L_QTY1=2&L_COST1=9.69&'
9696
. 'L_NAME2=Simple 3&L_QTY2=3&L_COST2=11.69&'
9797
. 'L_NAME3=Discount&L_QTY3=1&L_COST3=-10.00&'
98-
. 'TRXTYPE=A&ACTION=S&BUTTONSOURCE=Magento_Cart_';
98+
. 'TRXTYPE=A&ACTION=S&BUTTONSOURCE=Magento_2_';
9999

100100
$this->httpClient->method('write')
101101
->with(

dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Customer/PlaceOrderWithPayflowLinkTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,14 +119,14 @@ public function testResolvePlaceOrderWithPayflowLinkForCustomer(): void
119119
cart_id: "$cartId"
120120
payment_method: {
121121
code: "$paymentMethod"
122-
payflow_link:
122+
payflow_link:
123123
{
124124
cancel_url:"paypal/payflow/cancelPayment"
125125
return_url:"paypal/payflow/returnUrl"
126126
error_url:"paypal/payflow/errorUrl"
127127
}
128128
}
129-
}) {
129+
}) {
130130
cart {
131131
selected_payment_method {
132132
code
@@ -142,7 +142,7 @@ public function testResolvePlaceOrderWithPayflowLinkForCustomer(): void
142142
QUERY;
143143

144144
$productMetadata = ObjectManager::getInstance()->get(ProductMetadataInterface::class);
145-
$button = 'Magento_Cart_' . $productMetadata->getEdition();
145+
$button = 'Magento_2_' . $productMetadata->getEdition();
146146

147147
$payflowLinkResponse = new DataObject(
148148
[

dev/tests/integration/testsuite/Magento/PaypalGraphQl/Model/Resolver/Guest/PlaceOrderWithPayflowLinkTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,14 @@ public function testResolvePlaceOrderWithPayflowLink(): void
117117
cart_id: "$cartId"
118118
payment_method: {
119119
code: "$paymentMethod"
120-
payflow_link:
120+
payflow_link:
121121
{
122122
cancel_url:"paypal/payflow/cancel"
123123
return_url:"paypal/payflow/return"
124124
error_url:"paypal/payflow/error"
125125
}
126126
}
127-
}) {
127+
}) {
128128
cart {
129129
selected_payment_method {
130130
code
@@ -140,7 +140,7 @@ public function testResolvePlaceOrderWithPayflowLink(): void
140140
QUERY;
141141

142142
$productMetadata = ObjectManager::getInstance()->get(ProductMetadataInterface::class);
143-
$button = 'Magento_Cart_' . $productMetadata->getEdition();
143+
$button = 'Magento_2_' . $productMetadata->getEdition();
144144

145145
$payflowLinkResponse = new DataObject(
146146
[
@@ -219,14 +219,14 @@ public function testResolveWithPayflowLinkDeclined(): void
219219
cart_id: "$cartId"
220220
payment_method: {
221221
code: "$paymentMethod"
222-
payflow_link:
222+
payflow_link:
223223
{
224224
cancel_url:"paypal/payflow/cancelPayment"
225225
return_url:"paypal/payflow/returnUrl"
226226
error_url:"paypal/payflow/returnUrl"
227227
}
228228
}
229-
}) {
229+
}) {
230230
cart {
231231
selected_payment_method {
232232
code

0 commit comments

Comments
 (0)