Skip to content

Commit 22c2a1e

Browse files
committed
add missing @gl tag to mapbox tests
1 parent 654c08e commit 22c2a1e

File tree

6 files changed

+51
-56
lines changed

6 files changed

+51
-56
lines changed

test/jasmine/tests/mapbox_test.js

+24-29
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ Plotly.setPlotConfig({
2929
});
3030

3131
describe('mapbox defaults', function() {
32-
'use strict';
33-
3432
var layoutIn, layoutOut, fullData;
3533

3634
beforeEach(function() {
@@ -239,7 +237,7 @@ describe('mapbox credentials', function() {
239237
});
240238
});
241239

242-
it('should throw error if token is not registered', function() {
240+
it('@gl should throw error if token is not registered', function() {
243241
spyOn(Lib, 'error');
244242

245243
expect(function() {
@@ -253,7 +251,7 @@ describe('mapbox credentials', function() {
253251
expect(Lib.error).toHaveBeenCalledWith('Uses Mapbox map style, but did not set an access token.');
254252
}, LONG_TIMEOUT_INTERVAL);
255253

256-
it('should throw error if token is invalid', function(done) {
254+
it('@gl should throw error if token is invalid', function(done) {
257255
var cnt = 0;
258256

259257
Plotly.plot(gd, [{
@@ -273,7 +271,7 @@ describe('mapbox credentials', function() {
273271
});
274272
}, LONG_TIMEOUT_INTERVAL);
275273

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) {
277275
var cnt = 0;
278276

279277
Plotly.plot(gd, [{
@@ -295,7 +293,7 @@ describe('mapbox credentials', function() {
295293
});
296294
}, LONG_TIMEOUT_INTERVAL);
297295

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) {
299297
spyOn(Lib, 'warn');
300298
var cnt = 0;
301299

@@ -321,7 +319,7 @@ describe('mapbox credentials', function() {
321319
});
322320
}, LONG_TIMEOUT_INTERVAL);
323321

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) {
325323
var cnt = 0;
326324

327325
Plotly.plot(gd, [{
@@ -339,7 +337,7 @@ describe('mapbox credentials', function() {
339337
});
340338
}, LONG_TIMEOUT_INTERVAL);
341339

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) {
343341
spyOn(Lib, 'log');
344342
var cnt = 0;
345343

@@ -365,7 +363,7 @@ describe('mapbox credentials', function() {
365363
});
366364
}, LONG_TIMEOUT_INTERVAL);
367365

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) {
369367
var cnt = 0;
370368
var msg = [
371369
'An API access token is required to use Mapbox GL.',
@@ -405,8 +403,6 @@ describe('mapbox credentials', function() {
405403
});
406404

407405
describe('@noCI, mapbox plots', function() {
408-
'use strict';
409-
410406
var mock = require('@mocks/mapbox_0.json');
411407
var gd;
412408

@@ -426,7 +422,7 @@ describe('@noCI, mapbox plots', function() {
426422
destroyGraphDiv();
427423
});
428424

429-
it('should be able to toggle trace visibility', function(done) {
425+
it('@gl should be able to toggle trace visibility', function(done) {
430426
var modes = ['line', 'circle'];
431427

432428
expect(countVisibleTraces(gd, modes)).toEqual(2);
@@ -463,7 +459,7 @@ describe('@noCI, mapbox plots', function() {
463459
.then(done);
464460
}, LONG_TIMEOUT_INTERVAL);
465461

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) {
467463
var modes = ['line', 'circle'];
468464

469465
expect(countVisibleTraces(gd, modes)).toEqual(2);
@@ -504,7 +500,7 @@ describe('@noCI, mapbox plots', function() {
504500
.then(done);
505501
}, LONG_TIMEOUT_INTERVAL);
506502

507-
it('should be able to restyle', function(done) {
503+
it('@gl should be able to restyle', function(done) {
508504
var restyleCnt = 0;
509505
var relayoutCnt = 0;
510506

@@ -564,7 +560,7 @@ describe('@noCI, mapbox plots', function() {
564560
.then(done);
565561
}, LONG_TIMEOUT_INTERVAL);
566562

567-
it('should be able to relayout', function(done) {
563+
it('@gl should be able to relayout', function(done) {
568564
var restyleCnt = 0;
569565
var relayoutCnt = 0;
570566

@@ -625,7 +621,7 @@ describe('@noCI, mapbox plots', function() {
625621
.then(done);
626622
}, LONG_TIMEOUT_INTERVAL);
627623

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) {
629625
function assertLayout(style) {
630626
var mapInfo = getMapInfo(gd);
631627
expect(mapInfo.style.name).toEqual(style);
@@ -650,7 +646,7 @@ describe('@noCI, mapbox plots', function() {
650646
.then(done);
651647
}, LONG_TIMEOUT_INTERVAL);
652648

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) {
654650
var mockWithLayers = require('@mocks/mapbox_layers');
655651

656652
var layer0 = Lib.extendDeep({}, mockWithLayers.layout.mapbox.layers[0]);
@@ -808,7 +804,7 @@ describe('@noCI, mapbox plots', function() {
808804
.then(done);
809805
}, LONG_TIMEOUT_INTERVAL);
810806

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) {
812808
function makeFigure(color) {
813809
return {
814810
data: [{type: 'scattermapbox'}],
@@ -863,7 +859,7 @@ describe('@noCI, mapbox plots', function() {
863859
.then(done);
864860
}, LONG_TIMEOUT_INTERVAL);
865861

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) {
867863
Plotly.relayout(gd, 'mapbox.accesstoken', 'wont-work').catch(function(err) {
868864
expect(gd._fullLayout.mapbox.accesstoken).toEqual('wont-work');
869865
expect(err).toEqual(new Error(constants.mapOnErrorMsg));
@@ -878,7 +874,7 @@ describe('@noCI, mapbox plots', function() {
878874
.then(done);
879875
}, LONG_TIMEOUT_INTERVAL);
880876

881-
it('should be able to update traces', function(done) {
877+
it('@gl should be able to update traces', function(done) {
882878
function assertDataPts(lengths) {
883879
var lines = getGeoJsonData(gd, 'lines');
884880
var markers = getGeoJsonData(gd, 'markers');
@@ -916,7 +912,7 @@ describe('@noCI, mapbox plots', function() {
916912
.then(done);
917913
}, LONG_TIMEOUT_INTERVAL);
918914

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) {
920916
function assertMouseMove(pos, len) {
921917
return _mouseEvent('mousemove', pos, function() {
922918
var hoverLabels = d3.select('.hoverlayer').selectAll('g');
@@ -954,7 +950,7 @@ describe('@noCI, mapbox plots', function() {
954950
.then(done);
955951
}, LONG_TIMEOUT_INTERVAL);
956952

957-
it('should respond to hover interactions by', function(done) {
953+
it('@gl should respond to hover interactions by', function(done) {
958954
var hoverCnt = 0;
959955
var unhoverCnt = 0;
960956

@@ -1002,7 +998,7 @@ describe('@noCI, mapbox plots', function() {
1002998
.then(done);
1003999
}, LONG_TIMEOUT_INTERVAL);
10041000

1005-
it('should respond drag / scroll / double-click interactions', function(done) {
1001+
it('@gl should respond drag / scroll / double-click interactions', function(done) {
10061002
var relayoutCnt = 0;
10071003
var doubleClickCnt = 0;
10081004
var relayoutingCnt = 0;
@@ -1077,8 +1073,7 @@ describe('@noCI, mapbox plots', function() {
10771073
.then(done);
10781074
}, LONG_TIMEOUT_INTERVAL);
10791075

1080-
1081-
it('should respond to click interactions by', function(done) {
1076+
it('@gl should respond to click interactions by', function(done) {
10821077
var ptData;
10831078

10841079
gd.on('plotly_click', function(eventData) {
@@ -1105,7 +1100,7 @@ describe('@noCI, mapbox plots', function() {
11051100
.then(done);
11061101
}, LONG_TIMEOUT_INTERVAL);
11071102

1108-
it('should respect scrollZoom config option', function(done) {
1103+
it('@gl should respect scrollZoom config option', function(done) {
11091104
var mockCopy2 = Lib.extendDeep({}, mock);
11101105
mockCopy2.config = {scrollZoom: false};
11111106

@@ -1375,7 +1370,7 @@ describe('@noCI, mapbox toImage', function() {
13751370
destroyGraphDiv();
13761371
});
13771372

1378-
it('should generate image data with global credentials', function(done) {
1373+
it('@gl should generate image data with global credentials', function(done) {
13791374
Plotly.setPlotConfig({
13801375
mapboxAccessToken: MAPBOX_ACCESS_TOKEN
13811376
});
@@ -1395,7 +1390,7 @@ describe('@noCI, mapbox toImage', function() {
13951390
.then(done);
13961391
}, LONG_TIMEOUT_INTERVAL);
13971392

1398-
it('should generate image data with config credentials', function(done) {
1393+
it('@gl should generate image data with config credentials', function(done) {
13991394
Plotly.newPlot(gd, [{
14001395
type: 'scattermapbox',
14011396
lon: [0, 10, 20],
@@ -1413,7 +1408,7 @@ describe('@noCI, mapbox toImage', function() {
14131408
.then(done);
14141409
}, LONG_TIMEOUT_INTERVAL);
14151410

1416-
it('should generate image data with layout credentials', function(done) {
1411+
it('@gl should generate image data with layout credentials', function(done) {
14171412
Plotly.newPlot(gd, [{
14181413
type: 'scattermapbox',
14191414
lon: [0, 10, 20],

test/jasmine/tests/modebar_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,7 @@ describe('ModeBar', function() {
12341234
});
12351235

12361236
describe('@noCI mapbox handlers', function() {
1237-
it('button *resetViewMapbox* should reset the mapbox view attribute to their default', function(done) {
1237+
it('@gl button *resetViewMapbox* should reset the mapbox view attribute to their default', function(done) {
12381238
var gd = createGraphDiv();
12391239

12401240
function _assert(centerLon, centerLat, zoom) {

test/jasmine/tests/plot_api_react_test.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ describe('@noCIdep Plotly.react', function() {
881881
});
882882

883883
mockLists.mapbox.forEach(function(mockSpec) {
884-
it('@noCI can redraw "' + mockSpec[0] + '" with no changes as a noop (mapbpox mocks)', function(done) {
884+
it('@noCI @gl can redraw "' + mockSpec[0] + '" with no changes as a noop (mapbpox mocks)', function(done) {
885885
Plotly.setPlotConfig({
886886
mapboxAccessToken: MAPBOX_ACCESS_TOKEN
887887
});

0 commit comments

Comments
 (0)