File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/grid Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 1
1
define ( [
2
2
'Magento_Ui/js/grid/sortBy'
3
- ] , function ( sortBy ) {
3
+ ] , function ( SortBy ) {
4
4
'use strict' ;
5
+
5
6
describe ( 'Magento_Ui/js/grid/sortBy' , function ( ) {
6
7
7
8
var sortByObj ;
8
9
9
10
beforeEach ( function ( ) {
10
- sortByObj = new sortBy ( {
11
+ sortByObj = new SortBy ( {
11
12
options : [ ]
12
13
} ) ;
13
14
} ) ;
@@ -20,6 +21,7 @@ define([
20
21
index : 'name'
21
22
} ] ,
22
23
options = [ ] ;
24
+
23
25
sortByObj . preparedOptions ( columns ) ;
24
26
expect ( sortByObj . options ) . toEqual ( options ) ;
25
27
} ) ;
@@ -34,6 +36,7 @@ define([
34
36
value : 'name' ,
35
37
label : 'magento'
36
38
} ] ;
39
+
37
40
sortByObj . preparedOptions ( columns ) ;
38
41
expect ( sortByObj . options ) . toEqual ( options ) ;
39
42
} ) ;
@@ -44,6 +47,7 @@ define([
44
47
label : 'magento' ,
45
48
index : 'name'
46
49
} ] ;
50
+
47
51
sortByObj . preparedOptions ( columns ) ;
48
52
expect ( sortByObj . isVisible ( ) ) . toBeTruthy ( ) ;
49
53
} ) ;
@@ -54,6 +58,7 @@ define([
54
58
label : 'magento' ,
55
59
index : 'name'
56
60
} ] ;
61
+
57
62
sortByObj . preparedOptions ( columns ) ;
58
63
expect ( sortByObj . isVisible ( ) ) . toBeFalsy ( ) ;
59
64
} ) ;
@@ -64,6 +69,7 @@ define([
64
69
field : 'selectedOption' ,
65
70
direction : 'desc'
66
71
} ;
72
+
67
73
spyOn ( sortByObj , 'selectedOption' ) . and . returnValue ( 'selectedOption' ) ;
68
74
sortByObj . applyChanges ( ) ;
69
75
expect ( sortByObj . applied ( ) ) . toEqual ( applied ) ;
You can’t perform that action at this time.
0 commit comments