Skip to content

Commit 56ed88f

Browse files
committed
Merge branch '2.4-develop' of github.com:magento/magento2 into 1724-support-batches-synchronization
2 parents bf3c03a + 1ce8bcb commit 56ed88f

File tree

12 files changed

+112
-130
lines changed

12 files changed

+112
-130
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@
3131
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
3232
</after>
3333

34-
<amOnPage url="{{AdminProductIndexPage.url}}?filters[name]=$createSimpleProduct.name$" stepKey="navigateToProductGridWithFilters"/>
34+
<amOnPage url="{{AdminProductIndexPage.url}}?filters[sku]=$createSimpleProduct.sku$" stepKey="navigateToProductGridWithFilters"/>
3535
<waitForPageLoad stepKey="waitForProductGrid"/>
3636
<see selector="{{AdminProductGridSection.productGridNameProduct($createSimpleProduct.name$)}}" userInput="$createSimpleProduct.name$" stepKey="seeProduct"/>
3737
<waitForElementVisible selector="{{AdminProductGridFilterSection.enabledFilters}}" stepKey="waitForEnabledFilters"/>
3838
<seeElement selector="{{AdminProductGridFilterSection.enabledFilters}}" stepKey="seeEnabledFilters"/>
39-
<see selector="{{AdminProductGridFilterSection.enabledFilters}}" userInput="Name: $createSimpleProduct.name$" stepKey="seeProductNameFilter"/>
39+
<see selector="{{AdminProductGridFilterSection.enabledFilters}}" userInput="SKU: $createSimpleProduct.sku$" stepKey="seeProductNameFilter"/>
4040
</test>
4141
</tests>

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

Lines changed: 0 additions & 108 deletions
This file was deleted.

app/code/Magento/MediaGalleryCatalogUi/Test/Mftf/Test/AdminMediaGalleryCatalogUiVerifyUsedInLinkCategoryGridTest.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,16 @@
6060
<actionGroup ref="AdminMediaGalleryAssertCategoryNameInCategoryGridActionGroup" stepKey="assertCategoryInGrid">
6161
<argument name="categoryName" value="$$category.name$$"/>
6262
</actionGroup>
63+
<actionGroup ref="ClearFiltersAdminDataGridActionGroup" stepKey="clearFilters"/>
64+
<actionGroup ref="AdminOpenCategoryGridPageActionGroup" stepKey="openCategoryPageToVerifyIfFilterCanBeApplied"/>
65+
<actionGroup ref="AdminEnhancedMediaGalleryCategoryGridExpandFilterActionGroup" stepKey="expandFilters"/>
66+
<actionGroup ref="AdminEnhancedMediaGallerySelectUsedInFilterActionGroup" stepKey="setAssetFilter">
67+
<argument name="filterName" value="Asset"/>
68+
<argument name="optionName" value="{{UpdatedImageDetails.title}}"/>
69+
</actionGroup>
70+
<actionGroup ref="AdminEnhancedMediaGalleryCategoryGridApplyFiltersActionGroup" stepKey="applyFilters"/>
71+
<actionGroup ref="AssertAdminMediaGalleryAssetFilterPlaceHolderActionGroup" stepKey="assertFilterAppliedAfterUrlFilterApplier">
72+
<argument name="filterPlaceholder" value="{{UpdatedImageDetails.title}}"/>
73+
</actionGroup>
6374
</test>
6475
</tests>

app/code/Magento/MediaGalleryUi/Test/Mftf/ActionGroup/AdminEnhancedMediaGalleryAssertMassActionModeNotActiveActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
<annotations>
1313
<description>Asserts that massaction mode is terminated</description>
1414
</annotations>
15-
1615

16+
<dontSeeElement selector="{{AdminMediaGalleryHeaderButtonsSection.addSelected}}" stepKey="verifyAddSelectedButtonNotVisible"/>
1717
<dontSeeElement selector="{{AdminEnhancedMediaGalleryMassActionSection.totalSelected}}" stepKey="verifyTeminateMassAction"/>
1818
</actionGroup>
1919
</actionGroups>

app/code/Magento/MediaGalleryUi/Test/Mftf/Test/AdminEnhancedMediaGalleryDeleteImagesInBulkTest.xml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,17 @@
1919
<group value="media_gallery_ui"/>
2020
</annotations>
2121
<before>
22+
<createData entity="SimpleSubCategory" stepKey="category"/>
2223
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23-
<actionGroup ref="AdminOpenStandaloneMediaGalleryActionGroup" stepKey="openMediaGallery"/>
24+
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="openCategoryPage"/>
25+
<actionGroup ref="AdminCategoriesOpenCategoryActionGroup" stepKey="openCategory">
26+
<argument name="category" value="$$category$$"/>
27+
</actionGroup>
28+
<actionGroup ref="AdminOpenMediaGalleryFromCategoryImageUploaderActionGroup" stepKey="openMediaGalleryFromWysiwyg"/>
2429
</before>
30+
<after>
31+
<deleteData createDataKey="category" stepKey="deleteCategory"/>
32+
</after>
2533
<actionGroup ref="AdminEnhancedMediaGalleryUploadImageActionGroup" stepKey="uploadImage">
2634
<argument name="image" value="ImageUpload"/>
2735
</actionGroup>
@@ -34,7 +42,7 @@
3442
<argument name="imageName" value="{{ImageUpload.fileName}}"/>
3543
</actionGroup>
3644
<actionGroup ref="AdminEnhancedMediaGalleryDisableMassactionModeActionGroup" stepKey="disableMassActionMode"/>
37-
45+
3846
<actionGroup ref="AdminEnhancedMediaGalleryEnableMassActionModeActionGroup" stepKey="enableMassActionToDeleteImages"/>
3947
<actionGroup ref="AdminEnhancedMediaGallerySelectImageForMassActionActionGroup" stepKey="selectFirstImageToDelete">
4048
<argument name="imageName" value="{{ImageUpload.fileName}}"/>

app/code/Magento/MediaGalleryUi/view/adminhtml/web/css/source/_module.less

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
@color-media-gallery-buttons-border: #adadad;
1919
@color-media-gallery-buttons-text: #514943;
2020
@color-media-gallery-checkbox-background: #eee;
21-
21+
@color-media-gallery-scrollbar-background: #fff;
2222
& when (@media-common = true) {
2323

2424
.media-gallery-delete-image-action,
@@ -170,8 +170,9 @@
170170
height: 30px;
171171
margin: 1px;
172172
padding-left: 6px;
173+
padding-right: 10px;
173174
padding-top: 6px;
174-
width: 100%;
175+
width: max-content;
175176
}
176177

177178
.jstree-default .jstree-clicked {
@@ -272,8 +273,18 @@
272273
}
273274

274275
.media-directory-container {
276+
&::-webkit-scrollbar {
277+
background-color: @color-media-gallery-scrollbar-background;
278+
}
279+
&::-webkit-scrollbar-thumb {
280+
background-color: @color-masonry-grey;
281+
}
275282
float: left;
283+
max-width: 50%;
284+
overflow-x: scroll;
285+
overflow-y: hidden;
276286
padding-right: 40px;
287+
scrollbar-color: @color-masonry-grey @color-media-gallery-scrollbar-background;
277288
}
278289

279290
.media-gallery-image-block {

app/code/Magento/MediaGalleryUi/view/adminhtml/web/js/grid/massaction/massactions.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,8 @@ define([
141141
if (response.status === 'canceled') {
142142
return;
143143
}
144-
this.imageModel().selected({});
145-
this.massActionMode(false);
146-
this.switchMode();
147-
}.bind(this));
144+
$(window).trigger('terminateMassAction.MediaGallery');
145+
});
148146
}
149147
}.bind(this));
150148
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
/**
3+
*
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
8+
declare(strict_types=1);
9+
10+
namespace Magento\PageCache\Plugin;
11+
12+
use Magento\Framework\App\FrontControllerInterface;
13+
use Magento\Framework\App\Response\HttpInterface;
14+
15+
class AppendNoStoreCacheHeader
16+
{
17+
/**
18+
* Set cache-control header
19+
*
20+
* @param FrontControllerInterface $controller
21+
* @param HttpInterface $response
22+
* @return HttpInterface
23+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
24+
*/
25+
public function afterDispatch(FrontControllerInterface $controller, HttpInterface $response): HttpInterface
26+
{
27+
$response->setHeader('Cache-Control', 'no-store');
28+
return $response;
29+
}
30+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
9+
<type name="Magento\Framework\App\FrontControllerInterface">
10+
<plugin name="append_no_store_cache_header" type="Magento\PageCache\Plugin\AppendNoStoreCacheHeader" />
11+
</type>
12+
</config>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
9+
<type name="Magento\Framework\App\FrontControllerInterface">
10+
<plugin name="append_no_store_cache_header" type="Magento\PageCache\Plugin\AppendNoStoreCacheHeader" />
11+
</type>
12+
</config>

app/code/Magento/Ui/view/base/web/js/grid/url-filter-applier.js

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,9 @@
55

66
define([
77
'uiComponent',
8-
'underscore'
9-
], function (Component, _) {
8+
'underscore',
9+
'jquery'
10+
], function (Component, _, $) {
1011
'use strict';
1112

1213
return Component.extend({
@@ -36,7 +37,9 @@ define([
3637
* Apply filter
3738
*/
3839
apply: function () {
39-
var urlFilter = this.getFilterParam(this.searchString);
40+
var urlFilter = this.getFilterParam(this.searchString),
41+
applied,
42+
filters;
4043

4144
if (_.isUndefined(this.filterComponent())) {
4245
setTimeout(function () {
@@ -47,8 +50,9 @@ define([
4750
}
4851

4952
if (Object.keys(urlFilter).length) {
50-
this.filterComponent().setData(urlFilter, false);
51-
this.filterComponent().apply();
53+
applied = this.filterComponent().get('applied');
54+
filters = $.extend({}, applied, urlFilter);
55+
this.filterComponent().set('applied', filters);
5256
}
5357
},
5458

dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/grid/url-filter-applier.test.js

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ define([
1212
describe('Magento_Ui/js/grid/url-filter-applier', function () {
1313
var urlFilterApplierObj,
1414
filterComponentMock = {
15-
setData: jasmine.createSpy(),
15+
set: jasmine.createSpy(),
16+
get: jasmine.createSpy(),
1617
apply: jasmine.createSpy()
1718
};
1819

@@ -64,11 +65,14 @@ define([
6465
it('applies url filter on filter component', function () {
6566
urlFilterApplierObj.searchString = '?filters[name]=test&filters[qty]=1';
6667
urlFilterApplierObj.apply();
67-
expect(urlFilterApplierObj.filterComponent().setData).toHaveBeenCalledWith({
68-
'name': 'test',
69-
'qty': '1'
70-
}, false);
71-
expect(urlFilterApplierObj.filterComponent().apply).toHaveBeenCalled();
68+
expect(urlFilterApplierObj.filterComponent().get).toHaveBeenCalled();
69+
expect(urlFilterApplierObj.filterComponent().set).toHaveBeenCalledWith(
70+
'applied',
71+
{
72+
'name': 'test',
73+
'qty': '1'
74+
}
75+
);
7276
});
7377
});
7478
});

0 commit comments

Comments
 (0)