File tree Expand file tree Collapse file tree 2 files changed +22
-1
lines changed
app/code/Magento/Ui/view/base/web/js/grid/columns
dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/grid/columns Expand file tree Collapse file tree 2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -67,7 +67,11 @@ define([
67
67
}
68
68
} ) ;
69
69
70
- return labels . sort ( ) ;
70
+ return labels . sort (
71
+ function ( labelFirst , labelSecond ) {
72
+ return labelFirst . toLowerCase ( ) . localeCompare ( labelSecond . toLowerCase ( ) ) ;
73
+ }
74
+ ) ;
71
75
} ,
72
76
73
77
/**
Original file line number Diff line number Diff line change @@ -69,5 +69,22 @@ define([
69
69
expect ( expandable . getLabel ) . toHaveBeenCalled ( ) ;
70
70
} ) ;
71
71
} ) ;
72
+
73
+ describe ( 'getLabelsArray method' , function ( ) {
74
+ it ( 'check if label array sort alphabetically case insensitive' , function ( ) {
75
+ record [ 'shared_catalog' ] . push ( 1 , 2 , 3 ) ;
76
+ expandable . options . push ( {
77
+ label : 'Default' ,
78
+ value : '1'
79
+ } , {
80
+ label : 'Label' ,
81
+ value : '2'
82
+ } , {
83
+ label : 'default' ,
84
+ value : '3'
85
+ } ) ;
86
+ expect ( expandable . getLabelsArray ( record ) ) . toEqual ( [ 'Default' , 'default' , 'Label' ] ) ;
87
+ } ) ;
88
+ } ) ;
72
89
} ) ;
73
90
} ) ;
You can’t perform that action at this time.
0 commit comments