File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -99,9 +99,14 @@ describe('The legend', function() {
9999 legend = document . getElementsByClassName ( 'legend' ) [ 0 ] ,
100100 scrollBox ,
101101 scrollBar ,
102+ scrollBarX ,
103+ scrollBarY ,
102104 toggle ;
103105
104106 legend . dispatchEvent ( scrollTo ( wheelDeltaY ) ) ;
107+ scrollBar = legend . getElementsByClassName ( 'scrollbar' ) [ 0 ] ;
108+ scrollBarX = scrollBar . getAttribute ( 'x' ) ,
109+ scrollBarY = scrollBar . getAttribute ( 'y' ) ;
105110
106111 Plotly . relayout ( gd , 'showlegend' , false ) ;
107112 Plotly . relayout ( gd , 'showlegend' , true ) ;
@@ -112,6 +117,8 @@ describe('The legend', function() {
112117 toggle = legend . getElementsByClassName ( 'legendtoggle' ) [ 0 ] ;
113118
114119 legend . dispatchEvent ( scrollTo ( wheelDeltaY ) ) ;
120+ expect ( scrollBar . getAttribute ( 'x' ) ) . toBe ( scrollBarX ) ;
121+ expect ( scrollBar . getAttribute ( 'y' ) ) . toBe ( scrollBarY ) ;
115122
116123 var dataScroll = scrollBox . getAttribute ( 'data-scroll' ) ;
117124 toggle . dispatchEvent ( new MouseEvent ( 'click' ) ) ;
You can’t perform that action at this time.
0 commit comments