Skip to content

Commit e778644

Browse files
authored
Merge pull request #4447 from plotly/new-mapbox-access-token
Replace mapbox access token with token from plotly-js-tests account
2 parents 26541c3 + 8b49d3c commit e778644

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

tasks/noci_test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ test_image () {
3030
$root/../orca/bin/orca.js graph \
3131
$root/test/image/mocks/mapbox_* \
3232
--plotly $root/build/plotly.js \
33-
--mapbox-access-token "pk.eyJ1IjoiZXRwaW5hcmQiLCJhIjoiY2luMHIzdHE0MGFxNXVubTRxczZ2YmUxaCJ9.hwWZful0U2CQxit4ItNsiQ" \
33+
--mapbox-access-token "pk.eyJ1IjoicGxvdGx5LWpzLXRlc3RzIiwiYSI6ImNrNG9meTJmOTAxa3UzZm10dWdteDQ2eWMifQ.2REjOFyIrleMqwS8H8y1-A" \
3434
--output-dir $root/test/image/baselines/ \
3535
--verbose || EXIT_STATE=$?
3636
}

tasks/util/constants.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ module.exports = {
8383

8484
// this mapbox access token is 'public', no need to hide it
8585
// more info: https://www.mapbox.com/help/define-access-token/
86-
mapboxAccessToken: 'pk.eyJ1IjoiZXRwaW5hcmQiLCJhIjoiY2luMHIzdHE0MGFxNXVubTRxczZ2YmUxaCJ9.hwWZful0U2CQxit4ItNsiQ',
86+
mapboxAccessToken: 'pk.eyJ1IjoicGxvdGx5LWpzLXRlc3RzIiwiYSI6ImNrNG9meTJmOTAxa3UzZm10dWdteDQ2eWMifQ.2REjOFyIrleMqwS8H8y1-A',
8787
pathToCredentials: path.join(pathToBuild, 'credentials.json'),
8888

8989
testContainerImage: 'plotly/testbed:latest',
-23.9 KB
Loading

test/image/mocks/mapbox_custom-style.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
],
4949
"layout": {
5050
"mapbox": {
51-
"style": "mapbox://styles/etpinard/cip93fm98000sbmnuednknloo",
51+
"style": "mapbox://styles/plotly-js-tests/ck4og36lx0vnj1cpdl8y0cr8m",
5252
"center": {
5353
"lon": -73.60287319770295,
5454
"lat": 45.50110152988742

test/jasmine/tests/mapbox_test.js

+8-8
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ describe('mapbox credentials', function() {
410410
}], {
411411
mapbox: {
412412
accesstoken: MAPBOX_ACCESS_TOKEN,
413-
style: 'mapbox://styles/etpinard/cip93fm98000sbmnuednknloo'
413+
style: 'mapbox://styles/plotly-js-tests/ck4og36lx0vnj1cpdl8y0cr8m'
414414
}
415415
}).catch(function() {
416416
cnt++;
@@ -1329,13 +1329,13 @@ describe('@noCI, mapbox plots', function() {
13291329

13301330
expect([evtData['mapbox.center'].lon, evtData['mapbox.center'].lat]).toBeCloseToArray(center);
13311331
expect(evtData['mapbox.zoom']).toBeCloseTo(zoom);
1332-
expect(evtData['mapbox._derived']).toEqual({
1333-
coordinates: [
1334-
[lon0, lat1],
1335-
[lon1, lat1],
1336-
[lon1, lat0],
1337-
[lon0, lat0]
1338-
]});
1332+
expect(Object.keys(evtData['mapbox._derived'])).toEqual(['coordinates']);
1333+
expect(evtData['mapbox._derived'].coordinates).toBeCloseTo2DArray([
1334+
[lon0, lat1],
1335+
[lon1, lat1],
1336+
[lon1, lat0],
1337+
[lon0, lat0]
1338+
], -0.1);
13391339
}
13401340

13411341
_assertLayout([-4.710, 19.475], 1.234);

0 commit comments

Comments
 (0)