Skip to content

Commit 150a818

Browse files
committed
Merge remote-tracking branch 'mainline/2.4-develop' into 29251-configurable-options-selection
2 parents 6384b96 + c03bde6 commit 150a818

File tree

23 files changed

+145
-66
lines changed

23 files changed

+145
-66
lines changed

app/code/Magento/Catalog/Test/Unit/Model/Plugin/ProductRepository/TransactionWrapperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected function setUp(): void
6262
$this->closureMock = function () use ($productMock) {
6363
return $productMock;
6464
};
65-
$this->rollbackClosureMock = function () use ($productMock) {
65+
$this->rollbackClosureMock = function () {
6666
throw new \Exception(self::ERROR_MSG);
6767
};
6868

app/code/Magento/CatalogCustomerGraphQl/Model/Resolver/TierPrices.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function resolve(
8787
$this->tiers->addProductFilter($productId);
8888

8989
return $this->valueFactory->create(
90-
function () use ($productId, $context) {
90+
function () use ($productId) {
9191
$tierPrices = $this->tiers->getProductTierPrices($productId);
9292

9393
return $tierPrices ?? [];

app/code/Magento/CatalogSearch/Model/Advanced.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,8 @@ protected function getPreparedSearchCriteria($attribute, $value)
359359
if (is_array($value)) {
360360
if (isset($value['from']) && isset($value['to'])) {
361361
if (!empty($value['from']) || !empty($value['to'])) {
362+
$from = '';
363+
$to = '';
362364
if (isset($value['currency'])) {
363365
/** @var $currencyModel Currency */
364366
$currencyModel = $this->_currencyFactory->create()->load($value['currency']);

app/code/Magento/Checkout/Test/Mftf/ActionGroup/LoggedInUserCheckoutFillingShippingSectionActionGroup.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@
2424
<selectOption selector="{{CheckoutShippingSection.region}}" userInput="{{customerAddressVar.state}}" stepKey="selectRegion"/>
2525
<fillField selector="{{CheckoutShippingSection.postcode}}" userInput="{{customerAddressVar.postcode}}" stepKey="enterPostcode"/>
2626
<fillField selector="{{CheckoutShippingSection.telephone}}" userInput="{{customerAddressVar.telephone}}" stepKey="enterTelephone"/>
27-
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMask"/>
27+
<waitForPageLoad stepKey="waitForLoadingMask"/>
2828
<click selector="{{CheckoutShippingSection.firstShippingMethod}}" stepKey="selectFirstShippingMethod"/>
29-
<waitForElement selector="{{CheckoutShippingSection.next}}" time="30" stepKey="waitForNextButton"/>
29+
<waitForElementVisible selector="{{CheckoutShippingSection.next}}" time="30" stepKey="waitForNextButton"/>
30+
<waitForPageLoad stepKey="waitForShippingLoadingMask"/>
3031
<click selector="{{CheckoutShippingSection.next}}" stepKey="clickNext"/>
31-
<waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" time="30" stepKey="waitForPaymentSectionLoaded"/>
32+
<waitForElementVisible selector="{{CheckoutPaymentSection.paymentSectionTitle}}" time="30" stepKey="waitForPaymentSectionLoaded"/>
3233
<seeInCurrentUrl url="{{CheckoutPage.url}}/#payment" stepKey="assertCheckoutPaymentUrl"/>
3334
</actionGroup>
3435
</actionGroups>

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,8 @@ protected function prepareDefaultCustomerTitle(\Magento\Backend\Model\View\Resul
289289
protected function _addSessionErrorMessages($messages)
290290
{
291291
$messages = (array)$messages;
292-
$session = $this->_getSession();
293292

294-
$callback = function ($error) use ($session) {
293+
$callback = function ($error) {
295294
if (!$error instanceof Error) {
296295
$error = new Error($error);
297296
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AssertStorefrontCustomerHasNoOtherAddressesActionGroup">
11+
<annotations>
12+
<description>Verifies customer has no additional address in address book</description>
13+
</annotations>
14+
<amOnPage url="{{StorefrontCustomerAddressesPage.url}}" stepKey="goToAddressPage"/>
15+
<waitForText userInput="You have no other address entries in your address book." selector=".block-addresses-list" stepKey="assertOtherAddresses"/>
16+
</actionGroup>
17+
</actionGroups>

app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/BillingTest.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use Magento\Eav\Model\Entity\Attribute\AbstractAttribute;
1313
use Magento\Framework\DataObject;
1414
use PHPUnit\Framework\TestCase;
15-
use Psr\Log\LoggerInterface;
1615

1716
class BillingTest extends TestCase
1817
{
@@ -23,10 +22,7 @@ class BillingTest extends TestCase
2322

2423
protected function setUp(): void
2524
{
26-
$logger = $this->getMockBuilder(LoggerInterface::class)
27-
->getMock();
28-
/** @var LoggerInterface $logger */
29-
$this->testable = new Billing($logger);
25+
$this->testable = new Billing();
3026
}
3127

3228
public function testBeforeSave()

app/code/Magento/Customer/Test/Unit/Model/Customer/Attribute/Backend/ShippingTest.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
use Magento\Eav\Model\Entity\Attribute\AbstractAttribute;
1313
use Magento\Framework\DataObject;
1414
use PHPUnit\Framework\TestCase;
15-
use Psr\Log\LoggerInterface;
1615

1716
class ShippingTest extends TestCase
1817
{
@@ -23,10 +22,7 @@ class ShippingTest extends TestCase
2322

2423
protected function setUp(): void
2524
{
26-
$logger = $this->getMockBuilder(LoggerInterface::class)
27-
->getMock();
28-
/** @var LoggerInterface $logger */
29-
$this->testable = new Shipping($logger);
25+
$this->testable = new Shipping();
3026
}
3127

3228
public function testBeforeSave()

app/code/Magento/Customer/Test/Unit/Model/Plugin/CustomerRepository/TransactionWrapperTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected function setUp(): void
6262
$this->closureMock = function () use ($customerMock) {
6363
return $customerMock;
6464
};
65-
$this->rollbackClosureMock = function () use ($customerMock) {
65+
$this->rollbackClosureMock = function () {
6666
throw new \Exception(self::ERROR_MSG);
6767
};
6868

app/code/Magento/Sales/Model/AdminOrder/Create.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -550,6 +550,9 @@ public function initFromOrder(\Magento\Sales\Model\Order $order)
550550

551551
$quote = $this->getQuote();
552552
if (!$quote->isVirtual() && $this->getShippingAddress()->getSameAsBilling()) {
553+
$quote->getBillingAddress()->setCustomerAddressId(
554+
$quote->getShippingAddress()->getCustomerAddressId()
555+
);
553556
$this->setShippingAsBilling(1);
554557
}
555558

@@ -2120,6 +2123,9 @@ private function isAddressesAreEqual(Order $order)
21202123
$billingData['address_type'],
21212124
$billingData['entity_id']
21222125
);
2126+
if (isset($shippingData['customer_address_id']) && !isset($billingData['customer_address_id'])) {
2127+
unset($shippingData['customer_address_id']);
2128+
}
21232129

21242130
return $shippingData == $billingData;
21252131
}

0 commit comments

Comments
 (0)