Skip to content

Commit cb8e7c5

Browse files
SarmisthaSarmistha
authored andcommitted
Merge branch '2.4-develop' of https://github.com/magento-l3/magento2ce into ACP2E-2709
2 parents 15ec54a + 015b8dd commit cb8e7c5

File tree

18 files changed

+140
-49
lines changed

18 files changed

+140
-49
lines changed

app/code/Magento/Backend/Block/Menu.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919
class Menu extends \Magento\Backend\Block\Template
2020
{
21-
const CACHE_TAGS = 'BACKEND_MAINMENU';
21+
public const CACHE_TAGS = 'BACKEND_MAINMENU';
2222

2323
/**
2424
* @var string
@@ -347,6 +347,11 @@ protected function _columnBrake($items, $limit)
347347
}
348348
$result[] = ['place' => $place, 'colbrake' => $colbrake];
349349
}
350+
351+
if (isset($result[1]) && $result[1]['colbrake'] === true && isset($result[2])) {
352+
$result[2]['colbrake'] = true;
353+
}
354+
350355
return $result;
351356
}
352357

app/code/Magento/Backend/Console/Command/CacheCleanCommand.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
class CacheCleanCommand extends AbstractCacheTypeManageCommand
1616
{
1717
/**
18-
* {@inheritdoc}
18+
* @inheritdoc
1919
*/
2020
protected function configure()
2121
{
@@ -32,12 +32,15 @@ protected function configure()
3232
*/
3333
protected function performAction(array $cacheTypes)
3434
{
35-
$this->eventManager->dispatch('adminhtml_cache_flush_system');
35+
if ($cacheTypes === [] || in_array('full_page', $cacheTypes)) {
36+
$this->eventManager->dispatch('adminhtml_cache_flush_system');
37+
}
38+
3639
$this->cacheManager->clean($cacheTypes);
3740
}
3841

3942
/**
40-
* {@inheritdoc}
43+
* @inheritdoc
4144
*/
4245
protected function getDisplayMessage()
4346
{

app/code/Magento/Backend/Console/Command/CacheFlushCommand.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
class CacheFlushCommand extends AbstractCacheTypeManageCommand
1616
{
1717
/**
18-
* {@inheritdoc}
18+
* @inheritdoc
1919
*/
2020
protected function configure()
2121
{
@@ -32,12 +32,15 @@ protected function configure()
3232
*/
3333
protected function performAction(array $cacheTypes)
3434
{
35-
$this->eventManager->dispatch('adminhtml_cache_flush_all');
35+
if ($cacheTypes === [] || in_array('full_page', $cacheTypes)) {
36+
$this->eventManager->dispatch('adminhtml_cache_flush_all');
37+
}
38+
3639
$this->cacheManager->flush($cacheTypes);
3740
}
3841

3942
/**
40-
* {@inheritdoc}
43+
* @inheritdoc
4144
*/
4245
protected function getDisplayMessage()
4346
{

app/code/Magento/Backend/Test/Unit/Console/Command/AbstractCacheManageCommandTest.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,22 @@ public function executeDataProvider()
3535
return [
3636
'implicit all' => [
3737
[],
38-
['A', 'B', 'C'],
39-
$this->getExpectedExecutionOutput(['A', 'B', 'C']),
38+
['A', 'B', 'C', 'full_page'],
39+
true,
40+
$this->getExpectedExecutionOutput(['A', 'B', 'C', 'full_page']),
4041
],
4142
'specified types' => [
4243
['types' => ['A', 'B']],
4344
['A', 'B'],
45+
false,
4446
$this->getExpectedExecutionOutput(['A', 'B']),
4547
],
48+
'fpc_only' => [
49+
['types' => ['full_page']],
50+
['full_page'],
51+
true,
52+
$this->getExpectedExecutionOutput(['full_page']),
53+
],
4654
];
4755
}
4856

app/code/Magento/Backend/Test/Unit/Console/Command/CacheCleanCommandTest.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,22 @@ protected function setUp(): void
2222
/**
2323
* @param array $param
2424
* @param array $types
25+
* @param bool $shouldDispatch
2526
* @param string $output
2627
* @dataProvider executeDataProvider
2728
*/
28-
public function testExecute($param, $types, $output)
29+
public function testExecute($param, $types, $shouldDispatch, $output)
2930
{
30-
$this->cacheManagerMock->expects($this->once())->method('getAvailableTypes')->willReturn(['A', 'B', 'C']);
31+
$this->cacheManagerMock->expects($this->once())->method('getAvailableTypes')->willReturn([
32+
'A', 'B', 'C', 'full_page'
33+
]);
3134
$this->cacheManagerMock->expects($this->once())->method('clean')->with($types);
32-
$this->eventManagerMock->expects($this->once())->method('dispatch')->with($this->cacheEventName);
35+
36+
if ($shouldDispatch) {
37+
$this->eventManagerMock->expects($this->once())->method('dispatch')->with($this->cacheEventName);
38+
} else {
39+
$this->eventManagerMock->expects($this->never())->method('dispatch');
40+
}
3341

3442
$commandTester = new CommandTester($this->command);
3543
$commandTester->execute($param);

app/code/Magento/Backend/Test/Unit/Console/Command/CacheFlushCommandTest.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,22 @@ protected function setUp(): void
2222
/**
2323
* @param array $param
2424
* @param array $types
25+
* @param bool $shouldDispatch
2526
* @param string $output
2627
* @dataProvider executeDataProvider
2728
*/
28-
public function testExecute($param, $types, $output)
29+
public function testExecute($param, $types, $shouldDispatch, $output)
2930
{
30-
$this->cacheManagerMock->expects($this->once())->method('getAvailableTypes')->willReturn(['A', 'B', 'C']);
31+
$this->cacheManagerMock->expects($this->once())->method('getAvailableTypes')->willReturn([
32+
'A', 'B', 'C', 'full_page'
33+
]);
3134
$this->cacheManagerMock->expects($this->once())->method('flush')->with($types);
32-
$this->eventManagerMock->expects($this->once())->method('dispatch')->with($this->cacheEventName);
35+
36+
if ($shouldDispatch) {
37+
$this->eventManagerMock->expects($this->once())->method('dispatch')->with($this->cacheEventName);
38+
} else {
39+
$this->eventManagerMock->expects($this->never())->method('dispatch');
40+
}
3341

3442
$commandTester = new CommandTester($this->command);
3543
$commandTester->execute($param);

app/code/Magento/Bundle/Test/Mftf/Test/AdminBundleDynamicAttributesAfterMassUpdateTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<argument name="consumerName" value="{{AdminProductAttributeUpdateConsumerData.consumerName}}"/>
4848
<argument name="maxMessages" value="{{AdminProductAttributeUpdateConsumerData.messageLimit}}"/>
4949
</actionGroup>
50-
<magentoCron stepKey="runCron"/>
50+
<magentoCron groups="default" stepKey="runCron"/>
5151

5252
<actionGroup ref="OpenProductForEditByClickingRowXColumnYInProductGridActionGroup" stepKey="openProductForEdit"/>
5353

app/code/Magento/Catalog/Test/Mftf/Test/StorefrontVerifyProductAfterPartialReindexOnSeveralWebsitesTest.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,11 @@
8787
<argument name="productName" value="{{_defaultProduct.name}}"/>
8888
</actionGroup>
8989

90-
<!-- Run cron -->
91-
<magentoCron stepKey="runCron" />
92-
<magentoCron stepKey="runCronTwice" />
90+
<!-- We need the 'indexer_update_all_views' job to run. This is the best
91+
way we can make that happen, but there is no guarantee that there is
92+
such a job already scheduled in the queue. -->
93+
<magentoCron groups="index" stepKey="runCron" />
94+
<comment userInput="We need the indexer_update_all_views job to run" stepKey="runCronTwice"/>
9395

9496
<!-- Check product is present in category after cron run -->
9597
<actionGroup ref="AssertProductInStorefrontCategoryPage" stepKey="assertProductInStorefront1">

app/code/Magento/SalesRule/Test/Mftf/Test/StorefrontReuseCouponCodeAfterOrderCanceledTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
<argument name="orderNumberMessage" value="CONST.successCheckoutOrderNumberMessage"/>
9595
<argument name="emailYouMessage" value="CONST.successCheckoutEmailYouMessage"/>
9696
</actionGroup>
97-
<magentoCron stepKey="runCronAfterPlacingOrder"/>
97+
<magentoCron groups="default" stepKey="runCronAfterPlacingOrder"/>
9898

9999
<!-- Get Order id -->
100100
<grabTextFrom selector="{{CheckoutSuccessMainSection.orderNumber22}}" stepKey="grabOrderNumber"/>
@@ -114,7 +114,7 @@
114114
<!-- Cancel order -->
115115
<actionGroup ref="CancelPendingOrderActionGroup" stepKey="cancelOrder"/>
116116
<waitForPageLoad stepKey="waitForOrderDetailsToLoad"/>
117-
<magentoCron stepKey="runCronAfterCancelingOrder"/>
117+
<magentoCron groups="default" stepKey="runCronAfterCancelingOrder"/>
118118

119119
<!-- Open My Account Page from Customer dropdown -->
120120
<actionGroup ref="StorefrontOpenMyAccountPageActionGroup" stepKey="goToMyAccountPage"/>

app/code/Magento/Ui/view/base/web/js/grid/massactions.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,15 @@ define([
6060
return this;
6161
}
6262

63-
action = this.getAction(actionIndex);
63+
action = this.getAction(actionIndex);
6464
callback = this._getCallback(action, data);
6565

6666
action.confirm ?
6767
this._confirm(action, callback) :
6868
callback();
6969

70+
this.close();
71+
7072
return this;
7173
},
7274

@@ -127,7 +129,7 @@ define([
127129
*/
128130
_getCallback: function (action, selections) {
129131
var callback = action.callback,
130-
args = [action, selections];
132+
args = [action, selections];
131133

132134
if (utils.isObject(callback)) {
133135
args.unshift(callback.target);

0 commit comments

Comments
 (0)