File tree 1 file changed +28
-0
lines changed
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -861,13 +861,41 @@ describe('ModeBar', function() {
861
861
} ) ;
862
862
863
863
describe ( 'button toggleSpikelines' , function ( ) {
864
+ it ( 'should not change layout hovermode' , function ( ) {
865
+ expect ( gd . _fullLayout . hovermode ) . toBe ( 'x' ) ;
866
+ assertActive ( hovermodeButtons , buttonCompare ) ;
867
+
868
+ buttonToggle . click ( ) ;
869
+ expect ( gd . _fullLayout . hovermode ) . toBe ( 'x' ) ;
870
+ assertActive ( hovermodeButtons , buttonCompare ) ;
871
+ } ) ;
864
872
it ( 'should makes spikelines visible' , function ( ) {
865
873
buttonToggle . click ( ) ;
866
874
expect ( gd . _fullLayout . _cartesianSpikesEnabled ) . toBe ( 'on' ) ;
867
875
868
876
buttonToggle . click ( ) ;
869
877
expect ( gd . _fullLayout . _cartesianSpikesEnabled ) . toBe ( 'off' ) ;
870
878
} ) ;
879
+ it ( 'should not become disabled when hovermode is switched off closest' , function ( ) {
880
+ buttonToggle . click ( ) ;
881
+ expect ( gd . _fullLayout . _cartesianSpikesEnabled ) . toBe ( 'on' ) ;
882
+
883
+ buttonCompare . click ( ) ;
884
+ expect ( gd . _fullLayout . _cartesianSpikesEnabled ) . toBe ( 'on' ) ;
885
+ } ) ;
886
+ it ( 'should keep the state on changing the hovermode' , function ( ) {
887
+ buttonToggle . click ( ) ;
888
+ expect ( gd . _fullLayout . _cartesianSpikesEnabled ) . toBe ( 'on' ) ;
889
+
890
+ buttonCompare . click ( ) ;
891
+ expect ( gd . _fullLayout . _cartesianSpikesEnabled ) . toBe ( 'on' ) ;
892
+
893
+ buttonToggle . click ( ) ;
894
+ expect ( gd . _fullLayout . _cartesianSpikesEnabled ) . toBe ( 'off' ) ;
895
+
896
+ buttonClosest . click ( ) ;
897
+ expect ( gd . _fullLayout . _cartesianSpikesEnabled ) . toBe ( 'off' ) ;
898
+ } ) ;
871
899
} ) ;
872
900
} ) ;
873
901
You can’t perform that action at this time.
0 commit comments