@@ -29,8 +29,6 @@ Plotly.setPlotConfig({
29
29
} ) ;
30
30
31
31
describe ( 'mapbox defaults' , function ( ) {
32
- 'use strict' ;
33
-
34
32
var layoutIn , layoutOut , fullData ;
35
33
36
34
beforeEach ( function ( ) {
@@ -239,7 +237,7 @@ describe('mapbox credentials', function() {
239
237
} ) ;
240
238
} ) ;
241
239
242
- it ( 'should throw error if token is not registered' , function ( ) {
240
+ it ( '@gl should throw error if token is not registered' , function ( ) {
243
241
spyOn ( Lib , 'error' ) ;
244
242
245
243
expect ( function ( ) {
@@ -253,7 +251,7 @@ describe('mapbox credentials', function() {
253
251
expect ( Lib . error ) . toHaveBeenCalledWith ( 'Uses Mapbox map style, but did not set an access token.' ) ;
254
252
} , LONG_TIMEOUT_INTERVAL ) ;
255
253
256
- it ( 'should throw error if token is invalid' , function ( done ) {
254
+ it ( '@gl should throw error if token is invalid' , function ( done ) {
257
255
var cnt = 0 ;
258
256
259
257
Plotly . plot ( gd , [ {
@@ -273,7 +271,7 @@ describe('mapbox credentials', function() {
273
271
} ) ;
274
272
} , LONG_TIMEOUT_INTERVAL ) ;
275
273
276
- it ( 'should use access token in mapbox layout options if present' , function ( done ) {
274
+ it ( '@gl should use access token in mapbox layout options if present' , function ( done ) {
277
275
var cnt = 0 ;
278
276
279
277
Plotly . plot ( gd , [ {
@@ -295,7 +293,7 @@ describe('mapbox credentials', function() {
295
293
} ) ;
296
294
} , LONG_TIMEOUT_INTERVAL ) ;
297
295
298
- it ( 'should warn when multiple tokens in mapbox layout options are present' , function ( done ) {
296
+ it ( '@gl should warn when multiple tokens in mapbox layout options are present' , function ( done ) {
299
297
spyOn ( Lib , 'warn' ) ;
300
298
var cnt = 0 ;
301
299
@@ -321,7 +319,7 @@ describe('mapbox credentials', function() {
321
319
} ) ;
322
320
} , LONG_TIMEOUT_INTERVAL ) ;
323
321
324
- it ( 'should not throw when using a custom non-mapbox style' , function ( done ) {
322
+ it ( '@gl should not throw when using a custom non-mapbox style' , function ( done ) {
325
323
var cnt = 0 ;
326
324
327
325
Plotly . plot ( gd , [ {
@@ -339,7 +337,7 @@ describe('mapbox credentials', function() {
339
337
} ) ;
340
338
} , LONG_TIMEOUT_INTERVAL ) ;
341
339
342
- it ( 'should log when an access token is set while using a custom non-mapbox style' , function ( done ) {
340
+ it ( '@gl should log when an access token is set while using a custom non-mapbox style' , function ( done ) {
343
341
spyOn ( Lib , 'log' ) ;
344
342
var cnt = 0 ;
345
343
@@ -365,7 +363,7 @@ describe('mapbox credentials', function() {
365
363
} ) ;
366
364
} , LONG_TIMEOUT_INTERVAL ) ;
367
365
368
- it ( 'should bypass access token in mapbox layout options when config points to an Atlas server' , function ( done ) {
366
+ it ( '@gl should bypass access token in mapbox layout options when config points to an Atlas server' , function ( done ) {
369
367
var cnt = 0 ;
370
368
var msg = [
371
369
'An API access token is required to use Mapbox GL.' ,
@@ -405,8 +403,6 @@ describe('mapbox credentials', function() {
405
403
} ) ;
406
404
407
405
describe ( '@noCI, mapbox plots' , function ( ) {
408
- 'use strict' ;
409
-
410
406
var mock = require ( '@mocks/mapbox_0.json' ) ;
411
407
var gd ;
412
408
@@ -426,7 +422,7 @@ describe('@noCI, mapbox plots', function() {
426
422
destroyGraphDiv ( ) ;
427
423
} ) ;
428
424
429
- it ( 'should be able to toggle trace visibility' , function ( done ) {
425
+ it ( '@gl should be able to toggle trace visibility' , function ( done ) {
430
426
var modes = [ 'line' , 'circle' ] ;
431
427
432
428
expect ( countVisibleTraces ( gd , modes ) ) . toEqual ( 2 ) ;
@@ -463,7 +459,7 @@ describe('@noCI, mapbox plots', function() {
463
459
. then ( done ) ;
464
460
} , LONG_TIMEOUT_INTERVAL ) ;
465
461
466
- it ( 'should be able to delete and add traces' , function ( done ) {
462
+ it ( '@gl should be able to delete and add traces' , function ( done ) {
467
463
var modes = [ 'line' , 'circle' ] ;
468
464
469
465
expect ( countVisibleTraces ( gd , modes ) ) . toEqual ( 2 ) ;
@@ -504,7 +500,7 @@ describe('@noCI, mapbox plots', function() {
504
500
. then ( done ) ;
505
501
} , LONG_TIMEOUT_INTERVAL ) ;
506
502
507
- it ( 'should be able to restyle' , function ( done ) {
503
+ it ( '@gl should be able to restyle' , function ( done ) {
508
504
var restyleCnt = 0 ;
509
505
var relayoutCnt = 0 ;
510
506
@@ -564,7 +560,7 @@ describe('@noCI, mapbox plots', function() {
564
560
. then ( done ) ;
565
561
} , LONG_TIMEOUT_INTERVAL ) ;
566
562
567
- it ( 'should be able to relayout' , function ( done ) {
563
+ it ( '@gl should be able to relayout' , function ( done ) {
568
564
var restyleCnt = 0 ;
569
565
var relayoutCnt = 0 ;
570
566
@@ -625,7 +621,7 @@ describe('@noCI, mapbox plots', function() {
625
621
. then ( done ) ;
626
622
} , LONG_TIMEOUT_INTERVAL ) ;
627
623
628
- it ( 'should be able to relayout the map style' , function ( done ) {
624
+ it ( '@gl should be able to relayout the map style' , function ( done ) {
629
625
function assertLayout ( style ) {
630
626
var mapInfo = getMapInfo ( gd ) ;
631
627
expect ( mapInfo . style . name ) . toEqual ( style ) ;
@@ -650,7 +646,7 @@ describe('@noCI, mapbox plots', function() {
650
646
. then ( done ) ;
651
647
} , LONG_TIMEOUT_INTERVAL ) ;
652
648
653
- it ( 'should be able to add, update and remove layers' , function ( done ) {
649
+ it ( '@gl should be able to add, update and remove layers' , function ( done ) {
654
650
var mockWithLayers = require ( '@mocks/mapbox_layers' ) ;
655
651
656
652
var layer0 = Lib . extendDeep ( { } , mockWithLayers . layout . mapbox . layers [ 0 ] ) ;
@@ -808,7 +804,7 @@ describe('@noCI, mapbox plots', function() {
808
804
. then ( done ) ;
809
805
} , LONG_TIMEOUT_INTERVAL ) ;
810
806
811
- it ( 'should be able to react to layer changes' , function ( done ) {
807
+ it ( '@gl should be able to react to layer changes' , function ( done ) {
812
808
function makeFigure ( color ) {
813
809
return {
814
810
data : [ { type : 'scattermapbox' } ] ,
@@ -863,7 +859,7 @@ describe('@noCI, mapbox plots', function() {
863
859
. then ( done ) ;
864
860
} , LONG_TIMEOUT_INTERVAL ) ;
865
861
866
- it ( 'should be able to update the access token' , function ( done ) {
862
+ it ( '@gl should be able to update the access token' , function ( done ) {
867
863
Plotly . relayout ( gd , 'mapbox.accesstoken' , 'wont-work' ) . catch ( function ( err ) {
868
864
expect ( gd . _fullLayout . mapbox . accesstoken ) . toEqual ( 'wont-work' ) ;
869
865
expect ( err ) . toEqual ( new Error ( constants . mapOnErrorMsg ) ) ;
@@ -878,7 +874,7 @@ describe('@noCI, mapbox plots', function() {
878
874
. then ( done ) ;
879
875
} , LONG_TIMEOUT_INTERVAL ) ;
880
876
881
- it ( 'should be able to update traces' , function ( done ) {
877
+ it ( '@gl should be able to update traces' , function ( done ) {
882
878
function assertDataPts ( lengths ) {
883
879
var lines = getGeoJsonData ( gd , 'lines' ) ;
884
880
var markers = getGeoJsonData ( gd , 'markers' ) ;
@@ -916,7 +912,7 @@ describe('@noCI, mapbox plots', function() {
916
912
. then ( done ) ;
917
913
} , LONG_TIMEOUT_INTERVAL ) ;
918
914
919
- it ( 'should display to hover labels on mouse over' , function ( done ) {
915
+ it ( '@gl should display to hover labels on mouse over' , function ( done ) {
920
916
function assertMouseMove ( pos , len ) {
921
917
return _mouseEvent ( 'mousemove' , pos , function ( ) {
922
918
var hoverLabels = d3 . select ( '.hoverlayer' ) . selectAll ( 'g' ) ;
@@ -954,7 +950,7 @@ describe('@noCI, mapbox plots', function() {
954
950
. then ( done ) ;
955
951
} , LONG_TIMEOUT_INTERVAL ) ;
956
952
957
- it ( 'should respond to hover interactions by' , function ( done ) {
953
+ it ( '@gl should respond to hover interactions by' , function ( done ) {
958
954
var hoverCnt = 0 ;
959
955
var unhoverCnt = 0 ;
960
956
@@ -1002,7 +998,7 @@ describe('@noCI, mapbox plots', function() {
1002
998
. then ( done ) ;
1003
999
} , LONG_TIMEOUT_INTERVAL ) ;
1004
1000
1005
- it ( 'should respond drag / scroll / double-click interactions' , function ( done ) {
1001
+ it ( '@gl should respond drag / scroll / double-click interactions' , function ( done ) {
1006
1002
var relayoutCnt = 0 ;
1007
1003
var doubleClickCnt = 0 ;
1008
1004
var relayoutingCnt = 0 ;
@@ -1077,8 +1073,7 @@ describe('@noCI, mapbox plots', function() {
1077
1073
. then ( done ) ;
1078
1074
} , LONG_TIMEOUT_INTERVAL ) ;
1079
1075
1080
-
1081
- it ( 'should respond to click interactions by' , function ( done ) {
1076
+ it ( '@gl should respond to click interactions by' , function ( done ) {
1082
1077
var ptData ;
1083
1078
1084
1079
gd . on ( 'plotly_click' , function ( eventData ) {
@@ -1105,7 +1100,7 @@ describe('@noCI, mapbox plots', function() {
1105
1100
. then ( done ) ;
1106
1101
} , LONG_TIMEOUT_INTERVAL ) ;
1107
1102
1108
- it ( 'should respect scrollZoom config option' , function ( done ) {
1103
+ it ( '@gl should respect scrollZoom config option' , function ( done ) {
1109
1104
var mockCopy2 = Lib . extendDeep ( { } , mock ) ;
1110
1105
mockCopy2 . config = { scrollZoom : false } ;
1111
1106
@@ -1375,7 +1370,7 @@ describe('@noCI, mapbox toImage', function() {
1375
1370
destroyGraphDiv ( ) ;
1376
1371
} ) ;
1377
1372
1378
- it ( 'should generate image data with global credentials' , function ( done ) {
1373
+ it ( '@gl should generate image data with global credentials' , function ( done ) {
1379
1374
Plotly . setPlotConfig ( {
1380
1375
mapboxAccessToken : MAPBOX_ACCESS_TOKEN
1381
1376
} ) ;
@@ -1395,7 +1390,7 @@ describe('@noCI, mapbox toImage', function() {
1395
1390
. then ( done ) ;
1396
1391
} , LONG_TIMEOUT_INTERVAL ) ;
1397
1392
1398
- it ( 'should generate image data with config credentials' , function ( done ) {
1393
+ it ( '@gl should generate image data with config credentials' , function ( done ) {
1399
1394
Plotly . newPlot ( gd , [ {
1400
1395
type : 'scattermapbox' ,
1401
1396
lon : [ 0 , 10 , 20 ] ,
@@ -1413,7 +1408,7 @@ describe('@noCI, mapbox toImage', function() {
1413
1408
. then ( done ) ;
1414
1409
} , LONG_TIMEOUT_INTERVAL ) ;
1415
1410
1416
- it ( 'should generate image data with layout credentials' , function ( done ) {
1411
+ it ( '@gl should generate image data with layout credentials' , function ( done ) {
1417
1412
Plotly . newPlot ( gd , [ {
1418
1413
type : 'scattermapbox' ,
1419
1414
lon : [ 0 , 10 , 20 ] ,
0 commit comments