File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,10 @@ describe('basic suite', function() {
69
69
expect ( select . val ( ) ) . toBe ( 'banana' ) ;
70
70
} ) ;
71
71
72
+ it ( 'highlight() should return undefined if index is undefined' , function ( ) {
73
+ expect ( select . data ( 'selectric' ) . highlight ( undefined ) ) . toBe ( undefined ) ;
74
+ } ) ;
75
+
72
76
it ( 'should not be bigger than max-height' , function ( ) {
73
77
select . selectric ( {
74
78
maxHeight : 120
Original file line number Diff line number Diff line change @@ -107,6 +107,13 @@ describe('mobile', function() {
107
107
expect ( $ ( '.selectric-wrapper' ) . find ( '.label' ) . text ( ) ) . toBe ( 'Apple' ) ;
108
108
} ) ;
109
109
} ) ;
110
+
111
+ it ( 'open() should return false on mobile' , function ( ) {
112
+ spyOn ( select . data ( 'selectric' ) . utils , 'isMobile' ) . and . returnValue ( true ) ;
113
+ spyOn ( select . data ( 'selectric' ) . options , 'nativeOnMobile' ) . and . returnValue ( true ) ;
114
+ expect ( select . data ( 'selectric' ) . open ( ) ) . toBe ( false ) ;
115
+ } ) ;
116
+
110
117
} ) ;
111
118
112
119
describe ( 'Multi Selects' , function ( ) {
You can’t perform that action at this time.
0 commit comments