Skip to content

Replace mapbox access token with token from plotly-js-tests account #4447

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion tasks/noci_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ test_image () {
$root/../orca/bin/orca.js graph \
$root/test/image/mocks/mapbox_* \
--plotly $root/build/plotly.js \
--mapbox-access-token "pk.eyJ1IjoiZXRwaW5hcmQiLCJhIjoiY2luMHIzdHE0MGFxNXVubTRxczZ2YmUxaCJ9.hwWZful0U2CQxit4ItNsiQ" \
--mapbox-access-token "pk.eyJ1IjoicGxvdGx5LWpzLXRlc3RzIiwiYSI6ImNrNG9meTJmOTAxa3UzZm10dWdteDQ2eWMifQ.2REjOFyIrleMqwS8H8y1-A" \
--output-dir $root/test/image/baselines/ \
--verbose || EXIT_STATE=$?
}
Expand Down
2 changes: 1 addition & 1 deletion tasks/util/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ module.exports = {

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

testContainerImage: 'plotly/testbed:latest',
Expand Down
Binary file modified test/image/baselines/mapbox_custom-style.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion test/image/mocks/mapbox_custom-style.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
],
"layout": {
"mapbox": {
"style": "mapbox://styles/etpinard/cip93fm98000sbmnuednknloo",
"style": "mapbox://styles/plotly-js-tests/ck4og36lx0vnj1cpdl8y0cr8m",
"center": {
"lon": -73.60287319770295,
"lat": 45.50110152988742
Expand Down
16 changes: 8 additions & 8 deletions test/jasmine/tests/mapbox_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ describe('mapbox credentials', function() {
}], {
mapbox: {
accesstoken: MAPBOX_ACCESS_TOKEN,
style: 'mapbox://styles/etpinard/cip93fm98000sbmnuednknloo'
style: 'mapbox://styles/plotly-js-tests/ck4og36lx0vnj1cpdl8y0cr8m'
}
}).catch(function() {
cnt++;
Expand Down Expand Up @@ -1329,13 +1329,13 @@ describe('@noCI, mapbox plots', function() {

expect([evtData['mapbox.center'].lon, evtData['mapbox.center'].lat]).toBeCloseToArray(center);
expect(evtData['mapbox.zoom']).toBeCloseTo(zoom);
expect(evtData['mapbox._derived']).toEqual({
coordinates: [
[lon0, lat1],
[lon1, lat1],
[lon1, lat0],
[lon0, lat0]
]});
expect(Object.keys(evtData['mapbox._derived'])).toEqual(['coordinates']);
expect(evtData['mapbox._derived'].coordinates).toBeCloseTo2DArray([
[lon0, lat1],
[lon1, lat1],
[lon1, lat0],
[lon0, lat0]
], -0.1);
}

_assertLayout([-4.710, 19.475], 1.234);
Expand Down