@@ -14,6 +14,7 @@ var customMatchers = require('../assets/custom_matchers');
14
14
var MAPBOX_ACCESS_TOKEN = require ( '@build/credentials.json' ) . MAPBOX_ACCESS_TOKEN ;
15
15
var TRANSITION_DELAY = 500 ;
16
16
var MOUSE_DELAY = 100 ;
17
+ var LONG_TIMEOUT_INTERVAL = 5 * jasmine . DEFAULT_TIMEOUT_INTERVAL ;
17
18
18
19
var noop = function ( ) { } ;
19
20
@@ -204,7 +205,7 @@ describe('mapbox credentials', function() {
204
205
lat : [ 10 , 20 , 30 ]
205
206
} ] ) ;
206
207
} ) . toThrow ( new Error ( constants . noAccessTokenErrorMsg ) ) ;
207
- } ) ;
208
+ } , LONG_TIMEOUT_INTERVAL ) ;
208
209
209
210
it ( 'should throw error if token is invalid' , function ( done ) {
210
211
var cnt = 0 ;
@@ -224,7 +225,7 @@ describe('mapbox credentials', function() {
224
225
expect ( cnt ) . toEqual ( 1 ) ;
225
226
done ( ) ;
226
227
} ) ;
227
- } ) ;
228
+ } , LONG_TIMEOUT_INTERVAL ) ;
228
229
229
230
it ( 'should use access token in mapbox layout options if present' , function ( done ) {
230
231
var cnt = 0 ;
@@ -246,7 +247,7 @@ describe('mapbox credentials', function() {
246
247
expect ( gd . _fullLayout . mapbox . accesstoken ) . toEqual ( MAPBOX_ACCESS_TOKEN ) ;
247
248
done ( ) ;
248
249
} ) ;
249
- } ) ;
250
+ } , LONG_TIMEOUT_INTERVAL ) ;
250
251
251
252
it ( 'should bypass access token in mapbox layout options when config points to an Atlas server' , function ( done ) {
252
253
var cnt = 0 ;
@@ -274,7 +275,7 @@ describe('mapbox credentials', function() {
274
275
expect ( cnt ) . toEqual ( 1 ) ;
275
276
done ( ) ;
276
277
} ) ;
277
- } ) ;
278
+ } , LONG_TIMEOUT_INTERVAL ) ;
278
279
} ) ;
279
280
280
281
describe ( 'mapbox plots' , function ( ) {
@@ -338,7 +339,7 @@ describe('mapbox plots', function() {
338
339
339
340
done ( ) ;
340
341
} ) ;
341
- } ) ;
342
+ } , LONG_TIMEOUT_INTERVAL ) ;
342
343
343
344
it ( 'should be able to delete and add traces' , function ( done ) {
344
345
var modes = [ 'line' , 'circle' ] ;
@@ -379,7 +380,7 @@ describe('mapbox plots', function() {
379
380
380
381
done ( ) ;
381
382
} ) ;
382
- } ) ;
383
+ } , LONG_TIMEOUT_INTERVAL ) ;
383
384
384
385
it ( 'should be able to restyle' , function ( done ) {
385
386
var restyleCnt = 0 ,
@@ -436,7 +437,7 @@ describe('mapbox plots', function() {
436
437
] ) ;
437
438
} )
438
439
. then ( done ) ;
439
- } ) ;
440
+ } , LONG_TIMEOUT_INTERVAL ) ;
440
441
441
442
it ( 'should be able to relayout' , function ( done ) {
442
443
var restyleCnt = 0 ,
@@ -506,7 +507,7 @@ describe('mapbox plots', function() {
506
507
507
508
done ( ) ;
508
509
} ) ;
509
- } ) ;
510
+ } , LONG_TIMEOUT_INTERVAL ) ;
510
511
511
512
it ( 'should be able to add, update and remove layers' , function ( done ) {
512
513
var mockWithLayers = require ( '@mocks/mapbox_layers' ) ;
@@ -638,7 +639,7 @@ describe('mapbox plots', function() {
638
639
639
640
done ( ) ;
640
641
} ) ;
641
- } ) ;
642
+ } , LONG_TIMEOUT_INTERVAL ) ;
642
643
643
644
it ( 'should be able to update the access token' , function ( done ) {
644
645
Plotly . relayout ( gd , 'mapbox.accesstoken' , 'wont-work' ) . catch ( function ( err ) {
@@ -652,7 +653,7 @@ describe('mapbox plots', function() {
652
653
expect ( gd . _promises . length ) . toEqual ( 0 ) ;
653
654
done ( ) ;
654
655
} ) ;
655
- } ) ;
656
+ } , LONG_TIMEOUT_INTERVAL ) ;
656
657
657
658
it ( 'should be able to update traces' , function ( done ) {
658
659
function assertDataPts ( lengths ) {
@@ -690,7 +691,7 @@ describe('mapbox plots', function() {
690
691
691
692
done ( ) ;
692
693
} ) ;
693
- } ) ;
694
+ } , LONG_TIMEOUT_INTERVAL ) ;
694
695
695
696
it ( 'should display to hover labels on mouse over' , function ( done ) {
696
697
function assertMouseMove ( pos , len ) {
@@ -704,7 +705,7 @@ describe('mapbox plots', function() {
704
705
assertMouseMove ( blankPos , 0 ) . then ( function ( ) {
705
706
return assertMouseMove ( pointPos , 1 ) ;
706
707
} ) . then ( done ) ;
707
- } ) ;
708
+ } , LONG_TIMEOUT_INTERVAL ) ;
708
709
709
710
it ( 'should respond to hover interactions by' , function ( done ) {
710
711
var hoverCnt = 0 ,
@@ -752,7 +753,7 @@ describe('mapbox plots', function() {
752
753
753
754
done ( ) ;
754
755
} ) ;
755
- } ) ;
756
+ } , LONG_TIMEOUT_INTERVAL ) ;
756
757
757
758
it ( 'should respond drag / scroll interactions' , function ( done ) {
758
759
var relayoutCnt = 0 ,
@@ -811,7 +812,7 @@ describe('mapbox plots', function() {
811
812
812
813
// TODO test scroll
813
814
814
- } ) ;
815
+ } , LONG_TIMEOUT_INTERVAL ) ;
815
816
816
817
it ( 'should respond to click interactions by' , function ( done ) {
817
818
var ptData ;
@@ -844,7 +845,7 @@ describe('mapbox plots', function() {
844
845
} ) ;
845
846
} )
846
847
. then ( done ) ;
847
- } ) ;
848
+ } , LONG_TIMEOUT_INTERVAL ) ;
848
849
849
850
function getMapInfo ( gd ) {
850
851
var subplot = gd . _fullLayout . mapbox . _subplot ,
0 commit comments