File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -101,14 +101,15 @@ describe('The legend', function() {
101101 var initialDataScroll = getScroll ( gd ) ;
102102 var wheelDeltaY = 100 ;
103103 var finalDataScroll = Lib . constrain ( initialDataScroll +
104- wheelDeltaY / scrollBarYMax * scrollBoxYMax ,
104+ ( ( wheelDeltaY / scrollBoxYMax ) * scrollBarYMax ) ,
105105 0 , scrollBoxYMax ) ;
106106
107107 legend . dispatchEvent ( scrollTo ( wheelDeltaY ) ) ;
108-
109- expect ( getScroll ( gd ) ) . toBe ( finalDataScroll ) ;
108+
109+ var dataScroll = getScroll ( gd ) ;
110+ expect ( dataScroll ) . toBeCloseTo ( finalDataScroll , 3 ) ;
110111 expect ( scrollBox . getAttribute ( 'transform' ) ) . toBe (
111- 'translate(0,' + - finalDataScroll + ')' ) ;
112+ 'translate(0,' + - dataScroll + ')' ) ;
112113 } ) ;
113114
114115 function dragScroll ( element , rightClick , mainClick ) {
You can’t perform that action at this time.
0 commit comments