Skip to content

Commit 88d6b51

Browse files
author
Stanislav Idolov
authored
🔃 [EngCom] Public Pull Requests - 2.2-develop
Accepted Public Pull Requests: - #18535: Fixed issues-18534: 2 wysiwyg on catalog category edit page (by @k1lAs) - #18643: Fix customer unsubscribed issue (by @janakbhimani) - #18597: [Backport] Fix empty cart button (by @luukschakenraad) - #18759: [Backport] Backend: add missing unit test for ModuleService class (by @dmytro-ch) - #18604: Fixed Issue: Special price of 0.0000 is not shown on frontend, but is calculated in cart (by @maheshWebkul721) Fixed GitHub Issues: - #18534: Bug when 2 wysiwyg editors are on category edit page or product edit page (reported by @k1lAs) has been fixed in #18535 by @k1lAs in 2.2-develop branch Related commits: 1. 07ee178 2. b5e915f - #17954: Customer get unsubscribe to newsletter on password reset email request with Newsletter Need to Confirm Set to Yes on admin settings (reported by @matin73) has been fixed in #18643 by @janakbhimani in 2.2-develop branch Related commits: 1. 332f88f 2. 8c868c3 3. 26e4dec - #18589: Empty cart button does not work (reported by @luukschakenraad) has been fixed in #18597 by @luukschakenraad in 2.2-develop branch Related commits: 1. 7acc46a - #18268: M2.2.6 : Special price of 0.0000 is not shown on frontend, but is calculated in cart (reported by @kanduvisla) has been fixed in #18604 by @maheshWebkul721 in 2.2-develop branch Related commits: 1. 8084aa9 2. 8296637 3. 4283936 4. 899a8a3
2 parents 42eebbb + 43c50c3 commit 88d6b51

File tree

5 files changed

+76
-2
lines changed

5 files changed

+76
-2
lines changed
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\Backend\Test\Unit\Service\V1;
9+
10+
use Magento\Backend\Service\V1\ModuleService;
11+
use Magento\Framework\Module\ModuleListInterface;
12+
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
13+
14+
/**
15+
* Module List Service Test
16+
*
17+
* Covers \Magento\Sales\Model\ValidatorResultMerger
18+
*/
19+
class ModuleServiceTest extends \PHPUnit\Framework\TestCase
20+
{
21+
/**
22+
* Testable Object
23+
*
24+
* @var ModuleService
25+
*/
26+
private $moduleService;
27+
28+
/**
29+
* @var ModuleListInterface|\PHPUnit_Framework_MockObject_MockObject
30+
*/
31+
private $moduleListMock;
32+
33+
/**
34+
* Object Manager
35+
*
36+
* @var ObjectManager
37+
*/
38+
private $objectManager;
39+
40+
/**
41+
* Set Up
42+
*
43+
* @return void
44+
*/
45+
protected function setUp()
46+
{
47+
$this->moduleListMock = $this->createMock(ModuleListInterface::class);
48+
$this->objectManager = new ObjectManager($this);
49+
$this->moduleService = $this->objectManager->getObject(
50+
ModuleService::class,
51+
[
52+
'moduleList' => $this->moduleListMock,
53+
]
54+
);
55+
}
56+
57+
/**
58+
* Test getModules method
59+
*
60+
* @return void
61+
*/
62+
public function testGetModules()
63+
{
64+
$moduleNames = ['Magento_Backend', 'Magento_Catalog', 'Magento_Customer'];
65+
$this->moduleListMock->expects($this->once())->method('getNames')->willReturn($moduleNames);
66+
67+
$expected = $moduleNames;
68+
$actual = $this->moduleService->getModules();
69+
$this->assertEquals($expected, $actual);
70+
}
71+
}

app/code/Magento/Catalog/Pricing/Price/BasePrice.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function getValue()
3030
$this->value = false;
3131
foreach ($this->priceInfo->getPrices() as $price) {
3232
if ($price instanceof BasePriceProviderInterface && $price->getValue() !== false) {
33-
$this->value = min($price->getValue(), $this->value ?: $price->getValue());
33+
$this->value = min($price->getValue(), $this->value !== false ? $this->value: $price->getValue());
3434
}
3535
}
3636
}

app/code/Magento/Catalog/view/adminhtml/templates/catalog/wysiwyg/js.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ var catalogWysiwygEditor = {
4343

4444
if (this.modal) {
4545
this.modal.html(jQuery(data).html());
46+
this.modal.modal('option', 'firedElementId', elementId);
4647
} else {
4748
this.modal = jQuery(data).modal({
4849
title: '<?= /* @escapeNotVerified */ __('WYSIWYG Editor') ?>',

app/code/Magento/Checkout/view/frontend/templates/cart/form.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<?php endif ?>
2525
<table id="shopping-cart-table"
2626
class="cart items data table"
27-
data-mage-init='{"shoppingCart":{"emptyCartButton": "action.clear",
27+
data-mage-init='{"shoppingCart":{"emptyCartButton": ".action.clear",
2828
"updateCartActionContainer": "#update_cart_action_container"}}'>
2929
<caption class="table-caption"><?= /* @escapeNotVerified */ __('Shopping Cart Items') ?></caption>
3030
<thead>

app/code/Magento/Newsletter/Model/Subscriber.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,8 @@ protected function _updateCustomerSubscription($customerId, $subscribe)
594594
} elseif (($this->getStatus() == self::STATUS_UNCONFIRMED) && ($customerData->getConfirmation() === null)) {
595595
$status = self::STATUS_SUBSCRIBED;
596596
$sendInformationEmail = true;
597+
} elseif (($this->getStatus() == self::STATUS_NOT_ACTIVE) && ($customerData->getConfirmation() === null)) {
598+
$status = self::STATUS_NOT_ACTIVE;
597599
} else {
598600
$status = self::STATUS_UNSUBSCRIBED;
599601
}

0 commit comments

Comments
 (0)