@@ -2,68 +2,66 @@ var Fx = require('@src/plots/cartesian/graph_interact');
22var Plots = require ( '@src/plots/plots' ) ;
33
44
5- describe ( 'Test FX ' , function ( ) {
5+ describe ( 'FX defaults ' , function ( ) {
66 'use strict' ;
77
8- describe ( 'defaults' , function ( ) {
8+ var layoutIn , layoutOut , fullData ;
99
10- var layoutIn , layoutOut , fullData ;
11-
12- beforeEach ( function ( ) {
13- layoutIn = { } ;
14- layoutOut = {
15- _has : Plots . _hasPlotType
16- } ;
17- fullData = [ { } ] ;
18- } ) ;
10+ beforeEach ( function ( ) {
11+ layoutIn = { } ;
12+ layoutOut = {
13+ _has : Plots . _hasPlotType
14+ } ;
15+ fullData = [ { } ] ;
16+ } ) ;
1917
20- it ( 'should default (blank version)' , function ( ) {
21- Fx . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
22- expect ( layoutOut . hovermode ) . toBe ( 'closest' , 'hovermode to closest' ) ;
23- expect ( layoutOut . dragmode ) . toBe ( 'zoom' , 'dragmode to zoom' ) ;
24- } ) ;
18+ it ( 'should default (blank version)' , function ( ) {
19+ Fx . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
20+ expect ( layoutOut . hovermode ) . toBe ( 'closest' , 'hovermode to closest' ) ;
21+ expect ( layoutOut . dragmode ) . toBe ( 'zoom' , 'dragmode to zoom' ) ;
22+ } ) ;
2523
26- it ( 'should default (cartesian version)' , function ( ) {
27- layoutOut . _basePlotModules = [ { name : 'cartesian' } ] ;
24+ it ( 'should default (cartesian version)' , function ( ) {
25+ layoutOut . _basePlotModules = [ { name : 'cartesian' } ] ;
2826
29- Fx . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
30- expect ( layoutOut . hovermode ) . toBe ( 'x' , 'hovermode to x' ) ;
31- expect ( layoutOut . dragmode ) . toBe ( 'zoom' , 'dragmode to zoom' ) ;
32- expect ( layoutOut . _isHoriz ) . toBe ( false , 'isHoriz to false' ) ;
33- } ) ;
27+ Fx . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
28+ expect ( layoutOut . hovermode ) . toBe ( 'x' , 'hovermode to x' ) ;
29+ expect ( layoutOut . dragmode ) . toBe ( 'zoom' , 'dragmode to zoom' ) ;
30+ expect ( layoutOut . _isHoriz ) . toBe ( false , 'isHoriz to false' ) ;
31+ } ) ;
3432
35- it ( 'should default (cartesian horizontal version)' , function ( ) {
36- layoutOut . _basePlotModules = [ { name : 'cartesian' } ] ;
37- fullData [ 0 ] = { orientation : 'h' } ;
33+ it ( 'should default (cartesian horizontal version)' , function ( ) {
34+ layoutOut . _basePlotModules = [ { name : 'cartesian' } ] ;
35+ fullData [ 0 ] = { orientation : 'h' } ;
3836
39- Fx . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
40- expect ( layoutOut . hovermode ) . toBe ( 'y' , 'hovermode to y' ) ;
41- expect ( layoutOut . dragmode ) . toBe ( 'zoom' , 'dragmode to zoom' ) ;
42- expect ( layoutOut . _isHoriz ) . toBe ( true , 'isHoriz to true' ) ;
43- } ) ;
37+ Fx . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
38+ expect ( layoutOut . hovermode ) . toBe ( 'y' , 'hovermode to y' ) ;
39+ expect ( layoutOut . dragmode ) . toBe ( 'zoom' , 'dragmode to zoom' ) ;
40+ expect ( layoutOut . _isHoriz ) . toBe ( true , 'isHoriz to true' ) ;
41+ } ) ;
4442
45- it ( 'should default (gl3d version)' , function ( ) {
46- layoutOut . _basePlotModules = [ { name : 'gl3d' } ] ;
43+ it ( 'should default (gl3d version)' , function ( ) {
44+ layoutOut . _basePlotModules = [ { name : 'gl3d' } ] ;
4745
48- Fx . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
49- expect ( layoutOut . hovermode ) . toBe ( 'closest' , 'hovermode to closest' ) ;
50- expect ( layoutOut . dragmode ) . toBe ( 'zoom' , 'dragmode to zoom' ) ;
51- } ) ;
46+ Fx . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
47+ expect ( layoutOut . hovermode ) . toBe ( 'closest' , 'hovermode to closest' ) ;
48+ expect ( layoutOut . dragmode ) . toBe ( 'zoom' , 'dragmode to zoom' ) ;
49+ } ) ;
5250
53- it ( 'should default (geo version)' , function ( ) {
54- layoutOut . _basePlotModules = [ { name : 'geo' } ] ;
51+ it ( 'should default (geo version)' , function ( ) {
52+ layoutOut . _basePlotModules = [ { name : 'geo' } ] ;
5553
56- Fx . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
57- expect ( layoutOut . hovermode ) . toBe ( 'closest' , 'hovermode to closest' ) ;
58- expect ( layoutOut . dragmode ) . toBe ( 'zoom' , 'dragmode to zoom' ) ;
59- } ) ;
54+ Fx . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
55+ expect ( layoutOut . hovermode ) . toBe ( 'closest' , 'hovermode to closest' ) ;
56+ expect ( layoutOut . dragmode ) . toBe ( 'zoom' , 'dragmode to zoom' ) ;
57+ } ) ;
6058
61- it ( 'should default (multi plot type version)' , function ( ) {
62- layoutOut . _basePlotModules = [ { name : 'cartesian' } , { name : 'gl3d' } ] ;
59+ it ( 'should default (multi plot type version)' , function ( ) {
60+ layoutOut . _basePlotModules = [ { name : 'cartesian' } , { name : 'gl3d' } ] ;
6361
64- Fx . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
65- expect ( layoutOut . hovermode ) . toBe ( 'x' , 'hovermode to x' ) ;
66- expect ( layoutOut . dragmode ) . toBe ( 'zoom' , 'dragmode to zoom' ) ;
67- } ) ;
62+ Fx . supplyLayoutDefaults ( layoutIn , layoutOut , fullData ) ;
63+ expect ( layoutOut . hovermode ) . toBe ( 'x' , 'hovermode to x' ) ;
64+ expect ( layoutOut . dragmode ) . toBe ( 'zoom' , 'dragmode to zoom' ) ;
6865 } ) ;
6966} ) ;
67+ } ) ;
0 commit comments