File tree Expand file tree Collapse file tree 2 files changed +14
-9
lines changed
app/code/Magento/MediaGalleryUi/Model/Directories
dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/grid Expand file tree Collapse file tree 2 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ private function getDirectories(): array
87
87
88
88
$ pathArray = explode ('/ ' , $ path );
89
89
$ displayName = strlen (end ($ pathArray )) > self ::NAME_LENGTH ?
90
- substr (end ($ pathArray ),0 , self ::NAME_LENGTH ) . "... " :
90
+ substr (end ($ pathArray ), 0 , self ::NAME_LENGTH ) . "... " :
91
91
end ($ pathArray );
92
92
$ directories [] = [
93
93
'data ' => count ($ pathArray ) > 0 ? $ displayName : $ path ,
Original file line number Diff line number Diff line change 5
5
6
6
/*eslint max-nested-callbacks: 0*/
7
7
define ( [
8
- 'Magento_Ui/js/grid/url-filter-applier'
9
- ] , function ( UrlFilterApplier ) {
8
+ 'Magento_Ui/js/grid/url-filter-applier' ,
9
+ 'jquery'
10
+ ] , function ( UrlFilterApplier , $ ) {
10
11
'use strict' ;
11
12
12
13
describe ( 'Magento_Ui/js/grid/url-filter-applier' , function ( ) {
13
14
var urlFilterApplierObj ,
14
15
filterComponentMock = {
15
- setData : jasmine . createSpy ( ) ,
16
+ set : jasmine . createSpy ( ) ,
17
+ get : jasmine . createSpy ( ) ,
16
18
apply : jasmine . createSpy ( )
17
19
} ;
18
20
@@ -64,11 +66,14 @@ define([
64
66
it ( 'applies url filter on filter component' , function ( ) {
65
67
urlFilterApplierObj . searchString = '?filters[name]=test&filters[qty]=1' ;
66
68
urlFilterApplierObj . apply ( ) ;
67
- expect ( urlFilterApplierObj . filterComponent ( ) . setData ) . toHaveBeenCalledWith ( {
68
- 'name' : 'test' ,
69
- 'qty' : '1'
70
- } , false ) ;
71
- expect ( urlFilterApplierObj . filterComponent ( ) . apply ) . toHaveBeenCalled ( ) ;
69
+ expect ( urlFilterApplierObj . filterComponent ( ) . get ) . toHaveBeenCalled ( ) ;
70
+ expect ( urlFilterApplierObj . filterComponent ( ) . set ) . toHaveBeenCalledWith (
71
+ 'applied' ,
72
+ {
73
+ 'name' : 'test' ,
74
+ 'qty' : '1'
75
+ }
76
+ ) ;
72
77
} ) ;
73
78
} ) ;
74
79
} ) ;
You can’t perform that action at this time.
0 commit comments