File tree 1 file changed +4
-7
lines changed
1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -41,17 +41,14 @@ describe('The legend', function() {
41
41
expect ( scrollBox . getAttribute ( 'data-scroll' ) ) . toBe ( '-5' ) ;
42
42
} ) ;
43
43
44
- it ( 'should constrain scrolling to the contents' , function ( ) {
45
- var scrollBox = legend . getElementsByClassName ( 'scrollbox' ) [ 0 ] ,
46
- scrollHeight = scrollBox . getBoundingClientRect ( ) . height ,
47
- legendHeight = legend . getAttribute ( 'height' ) ,
48
- maxHeight = legendHeight - scrollHeight - 12 ;
44
+ fit ( 'should constrain scrolling to the contents' , function ( ) {
45
+ var scrollBox = legend . getElementsByClassName ( 'scrollbox' ) [ 0 ] ;
49
46
50
47
legend . dispatchEvent ( scrollTo ( - 100 ) ) ;
51
48
expect ( scrollBox . getAttribute ( 'transform' ) ) . toBe ( 'translate(0, 0)' ) ;
52
49
53
- legend . dispatchEvent ( scrollTo ( 10000 ) ) ;
54
- expect ( scrollBox . getAttribute ( 'transform' ) ) . toBe ( 'translate(0, ' + maxHeight + ' )') ;
50
+ legend . dispatchEvent ( scrollTo ( 100000 ) ) ;
51
+ expect ( scrollBox . getAttribute ( 'transform' ) ) . toBe ( 'translate(0, -179 )' ) ;
55
52
} ) ;
56
53
57
54
it ( 'should scale the scrollbar movement from top to bottom' , function ( ) {
You can’t perform that action at this time.
0 commit comments