@@ -754,6 +754,7 @@ describe('hover info on overlaid subplots', function() {
754
754
describe ( 'hover after resizing' , function ( ) {
755
755
'use strict' ;
756
756
757
+ var gd ;
757
758
afterEach ( destroyGraphDiv ) ;
758
759
759
760
function _click ( pos ) {
@@ -767,22 +768,17 @@ describe('hover after resizing', function() {
767
768
}
768
769
769
770
function assertLabelCount ( pos , cnt , msg ) {
770
- return new Promise ( function ( resolve ) {
771
- mouseEvent ( 'mousemove' , pos [ 0 ] , pos [ 1 ] ) ;
772
-
773
- setTimeout ( function ( ) {
774
- var hoverText = d3 . selectAll ( 'g.hovertext' ) ;
775
- expect ( hoverText . size ( ) ) . toEqual ( cnt , msg ) ;
771
+ delete gd . _lastHoverTime ;
772
+ mouseEvent ( 'mousemove' , pos [ 0 ] , pos [ 1 ] ) ;
776
773
777
- resolve ( ) ;
778
- } , HOVERMINTIME ) ;
779
- } ) ;
774
+ var hoverText = d3 . selectAll ( 'g.hovertext' ) ;
775
+ expect ( hoverText . size ( ) ) . toBe ( cnt , msg ) ;
780
776
}
781
777
782
778
it ( 'should work' , function ( done ) {
783
779
var data = [ { y : [ 2 , 1 , 2 ] } ] ,
784
- layout = { width : 600 , height : 500 } ,
785
- gd = createGraphDiv ( ) ;
780
+ layout = { width : 600 , height : 500 } ;
781
+ gd = createGraphDiv ( ) ;
786
782
787
783
var pos0 = [ 305 , 403 ] ,
788
784
pos1 = [ 401 , 122 ] ;
0 commit comments