Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
43c568f
improve Choropleth.calc
etpinard Jun 18, 2019
91e0319
add dflt to choropleth marker.line.color
etpinard Jun 7, 2019
8fc1dbe
add choroplethmapbox attributes
etpinard Jun 4, 2019
70878b7
add `PlotlyGeoAssets` to window during Plotly.register
etpinard Jun 6, 2019
012a749
fetch GeoJSON URLs found in calcdata before updateData()
etpinard Jun 18, 2019
5d27983
introducing choroplethmapbox trace module
etpinard Jun 18, 2019
f7f3190
sort all choroplethmapbox traces below scattermapbox traces
etpinard Jun 18, 2019
4e88075
add GeoJSON feature 'properties' to eventData
etpinard Jun 18, 2019
a166761
improve mapbox hover after drag
etpinard Jun 18, 2019
9a602ba
first cut choroplethmapbox tests
etpinard Jun 18, 2019
a457722
allow numbers as *locations* items when using custom *geojson*
etpinard Jun 18, 2019
1359307
fixup choroplethmapbox hover content post-#3968
etpinard Jun 18, 2019
4d7e0aa
implement *below* in choroplethmapbox traces
etpinard Jun 26, 2019
cb202a8
add :three: choroplethmapbox mocks
etpinard Jun 26, 2019
e509047
mojtaba-proof a few things
etpinard Jun 27, 2019
7dd04e7
fixup choroplethmapbox "below" test
etpinard Jun 27, 2019
654c08e
do not coerce choropleth* marker.line.color
etpinard Jun 27, 2019
22c2a1e
add missing @gl tag to mapbox tests
etpinard Jun 27, 2019
fe6782d
add doNotFailOnEmptyTestSuite CLI option
etpinard Jun 27, 2019
7e15d81
add densitymapbox attributes
etpinard Jun 28, 2019
91a9bc4
implement densitymapbox
etpinard Jun 28, 2019
4f42d1b
add densitymapbox jasmine tests
etpinard Jun 28, 2019
4299857
add :three: densitymapbox mocks
etpinard Jun 28, 2019
1add90e
remove layers from last to first
etpinard Jun 28, 2019
ca48461
Merge pull request #3993 from plotly/densitymapbox-pr
etpinard Jun 28, 2019
6d7929c
Merge branch 'mapbox-v1' into choroplethmapbox-pr
etpinard Jul 3, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add missing @gl tag to mapbox tests
  • Loading branch information
etpinard committed Jun 27, 2019
commit 22c2a1e5b20744d1a3d227633dd62d3060c12f3c
53 changes: 24 additions & 29 deletions test/jasmine/tests/mapbox_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ Plotly.setPlotConfig({
});

describe('mapbox defaults', function() {
'use strict';

var layoutIn, layoutOut, fullData;

beforeEach(function() {
Expand Down Expand Up @@ -239,7 +237,7 @@ describe('mapbox credentials', function() {
});
});

it('should throw error if token is not registered', function() {
it('@gl should throw error if token is not registered', function() {
spyOn(Lib, 'error');

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

it('should throw error if token is invalid', function(done) {
it('@gl should throw error if token is invalid', function(done) {
var cnt = 0;

Plotly.plot(gd, [{
Expand All @@ -273,7 +271,7 @@ describe('mapbox credentials', function() {
});
}, LONG_TIMEOUT_INTERVAL);

it('should use access token in mapbox layout options if present', function(done) {
it('@gl should use access token in mapbox layout options if present', function(done) {
var cnt = 0;

Plotly.plot(gd, [{
Expand All @@ -295,7 +293,7 @@ describe('mapbox credentials', function() {
});
}, LONG_TIMEOUT_INTERVAL);

it('should warn when multiple tokens in mapbox layout options are present', function(done) {
it('@gl should warn when multiple tokens in mapbox layout options are present', function(done) {
spyOn(Lib, 'warn');
var cnt = 0;

Expand All @@ -321,7 +319,7 @@ describe('mapbox credentials', function() {
});
}, LONG_TIMEOUT_INTERVAL);

it('should not throw when using a custom non-mapbox style', function(done) {
it('@gl should not throw when using a custom non-mapbox style', function(done) {
var cnt = 0;

Plotly.plot(gd, [{
Expand All @@ -339,7 +337,7 @@ describe('mapbox credentials', function() {
});
}, LONG_TIMEOUT_INTERVAL);

it('should log when an access token is set while using a custom non-mapbox style', function(done) {
it('@gl should log when an access token is set while using a custom non-mapbox style', function(done) {
spyOn(Lib, 'log');
var cnt = 0;

Expand All @@ -365,7 +363,7 @@ describe('mapbox credentials', function() {
});
}, LONG_TIMEOUT_INTERVAL);

it('should bypass access token in mapbox layout options when config points to an Atlas server', function(done) {
it('@gl should bypass access token in mapbox layout options when config points to an Atlas server', function(done) {
var cnt = 0;
var msg = [
'An API access token is required to use Mapbox GL.',
Expand Down Expand Up @@ -405,8 +403,6 @@ describe('mapbox credentials', function() {
});

describe('@noCI, mapbox plots', function() {
'use strict';

var mock = require('@mocks/mapbox_0.json');
var gd;

Expand All @@ -426,7 +422,7 @@ describe('@noCI, mapbox plots', function() {
destroyGraphDiv();
});

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

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

it('should be able to delete and add traces', function(done) {
it('@gl should be able to delete and add traces', function(done) {
var modes = ['line', 'circle'];

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

it('should be able to restyle', function(done) {
it('@gl should be able to restyle', function(done) {
var restyleCnt = 0;
var relayoutCnt = 0;

Expand Down Expand Up @@ -564,7 +560,7 @@ describe('@noCI, mapbox plots', function() {
.then(done);
}, LONG_TIMEOUT_INTERVAL);

it('should be able to relayout', function(done) {
it('@gl should be able to relayout', function(done) {
var restyleCnt = 0;
var relayoutCnt = 0;

Expand Down Expand Up @@ -625,7 +621,7 @@ describe('@noCI, mapbox plots', function() {
.then(done);
}, LONG_TIMEOUT_INTERVAL);

it('should be able to relayout the map style', function(done) {
it('@gl should be able to relayout the map style', function(done) {
function assertLayout(style) {
var mapInfo = getMapInfo(gd);
expect(mapInfo.style.name).toEqual(style);
Expand All @@ -650,7 +646,7 @@ describe('@noCI, mapbox plots', function() {
.then(done);
}, LONG_TIMEOUT_INTERVAL);

it('should be able to add, update and remove layers', function(done) {
it('@gl should be able to add, update and remove layers', function(done) {
var mockWithLayers = require('@mocks/mapbox_layers');

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

it('should be able to react to layer changes', function(done) {
it('@gl should be able to react to layer changes', function(done) {
function makeFigure(color) {
return {
data: [{type: 'scattermapbox'}],
Expand Down Expand Up @@ -863,7 +859,7 @@ describe('@noCI, mapbox plots', function() {
.then(done);
}, LONG_TIMEOUT_INTERVAL);

it('should be able to update the access token', function(done) {
it('@gl should be able to update the access token', function(done) {
Plotly.relayout(gd, 'mapbox.accesstoken', 'wont-work').catch(function(err) {
expect(gd._fullLayout.mapbox.accesstoken).toEqual('wont-work');
expect(err).toEqual(new Error(constants.mapOnErrorMsg));
Expand All @@ -878,7 +874,7 @@ describe('@noCI, mapbox plots', function() {
.then(done);
}, LONG_TIMEOUT_INTERVAL);

it('should be able to update traces', function(done) {
it('@gl should be able to update traces', function(done) {
function assertDataPts(lengths) {
var lines = getGeoJsonData(gd, 'lines');
var markers = getGeoJsonData(gd, 'markers');
Expand Down Expand Up @@ -916,7 +912,7 @@ describe('@noCI, mapbox plots', function() {
.then(done);
}, LONG_TIMEOUT_INTERVAL);

it('should display to hover labels on mouse over', function(done) {
it('@gl should display to hover labels on mouse over', function(done) {
function assertMouseMove(pos, len) {
return _mouseEvent('mousemove', pos, function() {
var hoverLabels = d3.select('.hoverlayer').selectAll('g');
Expand Down Expand Up @@ -954,7 +950,7 @@ describe('@noCI, mapbox plots', function() {
.then(done);
}, LONG_TIMEOUT_INTERVAL);

it('should respond to hover interactions by', function(done) {
it('@gl should respond to hover interactions by', function(done) {
var hoverCnt = 0;
var unhoverCnt = 0;

Expand Down Expand Up @@ -1002,7 +998,7 @@ describe('@noCI, mapbox plots', function() {
.then(done);
}, LONG_TIMEOUT_INTERVAL);

it('should respond drag / scroll / double-click interactions', function(done) {
it('@gl should respond drag / scroll / double-click interactions', function(done) {
var relayoutCnt = 0;
var doubleClickCnt = 0;
var relayoutingCnt = 0;
Expand Down Expand Up @@ -1077,8 +1073,7 @@ describe('@noCI, mapbox plots', function() {
.then(done);
}, LONG_TIMEOUT_INTERVAL);


it('should respond to click interactions by', function(done) {
it('@gl should respond to click interactions by', function(done) {
var ptData;

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

it('should respect scrollZoom config option', function(done) {
it('@gl should respect scrollZoom config option', function(done) {
var mockCopy2 = Lib.extendDeep({}, mock);
mockCopy2.config = {scrollZoom: false};

Expand Down Expand Up @@ -1375,7 +1370,7 @@ describe('@noCI, mapbox toImage', function() {
destroyGraphDiv();
});

it('should generate image data with global credentials', function(done) {
it('@gl should generate image data with global credentials', function(done) {
Plotly.setPlotConfig({
mapboxAccessToken: MAPBOX_ACCESS_TOKEN
});
Expand All @@ -1395,7 +1390,7 @@ describe('@noCI, mapbox toImage', function() {
.then(done);
}, LONG_TIMEOUT_INTERVAL);

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

it('should generate image data with layout credentials', function(done) {
it('@gl should generate image data with layout credentials', function(done) {
Plotly.newPlot(gd, [{
type: 'scattermapbox',
lon: [0, 10, 20],
Expand Down
2 changes: 1 addition & 1 deletion test/jasmine/tests/modebar_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,7 @@ describe('ModeBar', function() {
});

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

function _assert(centerLon, centerLat, zoom) {
Expand Down
2 changes: 1 addition & 1 deletion test/jasmine/tests/plot_api_react_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ describe('@noCIdep Plotly.react', function() {
});

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