@@ -81,6 +81,7 @@ describe('rzslider - ', function() {
81
81
expect ( element . find ( 'span' ) ) . to . have . length ( 11 ) ;
82
82
expect ( slider . range ) . to . be . false ;
83
83
expect ( slider . valueRange ) . to . equal ( 100 ) ;
84
+ expect ( slider . maxH . css ( 'display' ) ) . to . equal ( 'none' ) ;
84
85
} ) ;
85
86
86
87
it ( 'should watch rzSliderModel and reflow the slider accordingly' , function ( ) {
@@ -169,6 +170,7 @@ describe('rzslider - ', function() {
169
170
expect ( element . find ( 'span' ) ) . to . have . length ( 11 ) ;
170
171
expect ( slider . range ) . to . be . true ;
171
172
expect ( slider . valueRange ) . to . equal ( 100 ) ;
173
+ expect ( slider . maxH . css ( 'display' ) ) . to . equal ( '' ) ;
172
174
} ) ;
173
175
174
176
it ( 'should watch rzSliderHigh and reflow the slider accordingly' , function ( ) {
@@ -288,6 +290,7 @@ describe('rzslider - ', function() {
288
290
expect ( element [ 0 ] . getBoundingClientRect ( ) . width ) . to . equal ( 1000 ) ;
289
291
expect ( slider . positionProperty ) . to . equal ( 'left' ) ;
290
292
expect ( slider . dimensionProperty ) . to . equal ( 'width' ) ;
293
+ expect ( slider . sliderElem . hasClass ( 'vertical' ) ) . to . be . false ;
291
294
} ) ;
292
295
293
296
it ( 'vertical slider should take the full height and get correct position/dimension properties' , function ( ) {
@@ -297,6 +300,7 @@ describe('rzslider - ', function() {
297
300
expect ( element [ 0 ] . getBoundingClientRect ( ) . height ) . to . equal ( 1000 ) ;
298
301
expect ( slider . positionProperty ) . to . equal ( 'bottom' ) ;
299
302
expect ( slider . dimensionProperty ) . to . equal ( 'height' ) ;
303
+ expect ( slider . sliderElem . hasClass ( 'vertical' ) ) . to . be . true ;
300
304
} ) ;
301
305
302
306
it ( 'should prevent invalid step' , function ( ) {
@@ -409,10 +413,17 @@ describe('rzslider - ', function() {
409
413
createRangeSlider ( sliderConf ) ;
410
414
} ) ;
411
415
416
+ it ( 'should set the correct class to true when draggableRange is true' , function ( ) {
417
+ scope . slider . options . draggableRange = true ;
418
+ scope . $digest ( ) ;
419
+ expect ( slider . selBar . hasClass ( 'rz-draggable' ) ) . to . be . true ;
420
+ } ) ;
421
+
412
422
it ( 'should set draggableRange to true when draggableRangeOnly is true' , function ( ) {
413
423
scope . slider . options . draggableRangeOnly = true ;
414
424
scope . $digest ( ) ;
415
425
expect ( slider . options . draggableRange ) . to . be . true ;
426
+ expect ( slider . selBar . hasClass ( 'rz-draggable' ) ) . to . be . true ;
416
427
} ) ;
417
428
418
429
it ( 'should sanitize rzSliderModel and rzSliderHigh between floor and ceil' , function ( ) {
0 commit comments