File tree Expand file tree Collapse file tree 4 files changed +7
-22
lines changed Expand file tree Collapse file tree 4 files changed +7
-22
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ var common = require('./util/common');
55
66// main
77makeCredentialsFile ( ) ;
8- makeSetPlotConfigFile ( ) ;
98makeTestImageFolders ( ) ;
109makeRequireJSFixture ( ) ;
1110
@@ -20,24 +19,6 @@ function makeCredentialsFile() {
2019 logger ( 'make build/credentials.json' ) ;
2120}
2221
23- // Create a 'set plot config' file,
24- // to be included in the image test index
25- function makeSetPlotConfigFile ( ) {
26- var setPlotConfig = [
27- '\'use strict\';' ,
28- '' ,
29- '/* global Plotly:false */' ,
30- '' ,
31- 'Plotly.setPlotConfig({' ,
32- ' mapboxAccessToken: \'' + constants . mapboxAccessToken + '\'' ,
33- '});' ,
34- ''
35- ] . join ( '\n' ) ;
36-
37- common . writeFile ( constants . pathToSetPlotConfig , setPlotConfig ) ;
38- logger ( 'make build/set_plot_config.js' ) ;
39- }
40-
4122// Make artifact folders for image tests
4223function makeTestImageFolders ( ) {
4324
Original file line number Diff line number Diff line change @@ -73,7 +73,6 @@ module.exports = {
7373 // more info: https://www.mapbox.com/help/define-access-token/
7474 mapboxAccessToken : 'pk.eyJ1IjoiZXRwaW5hcmQiLCJhIjoiY2luMHIzdHE0MGFxNXVubTRxczZ2YmUxaCJ9.hwWZful0U2CQxit4ItNsiQ' ,
7575 pathToCredentials : path . join ( pathToBuild , 'credentials.json' ) ,
76- pathToSetPlotConfig : path . join ( pathToBuild , 'set_plot_config.js' ) ,
7776
7877 testContainerImage : 'plotly/testbed:latest' ,
7978 testContainerName : process . env . PLOTLYJS_TEST_CONTAINER_NAME || 'imagetest' ,
Original file line number Diff line number Diff line change @@ -3,7 +3,12 @@ var constants = require('./constants');
33var containerCommands = {
44 cdHome : 'cd ' + constants . testContainerHome ,
55 cpIndex : 'cp -f test/image/index.html ../server_app/index.html' ,
6- restart : 'supervisorctl restart nw1' ,
6+ injectEnv : [
7+ 'sed -i' ,
8+ 's/process.env.PLOTLY_MAPBOX_DEFAULT_ACCESS_TOKEN/\\\'' + constants . mapboxAccessToken + '\\\'/' ,
9+ '../server_app/main.js'
10+ ] . join ( ' ' ) ,
11+ restart : 'supervisorctl restart nw1'
712} ;
813
914containerCommands . ping = [
@@ -14,6 +19,7 @@ containerCommands.ping = [
1419
1520containerCommands . setup = [
1621 containerCommands . cpIndex ,
22+ containerCommands . injectEnv ,
1723 containerCommands . restart ,
1824 'sleep 1' ,
1925 containerCommands . ping ,
Original file line number Diff line number Diff line change 55< script type ="text/javascript " src ="../plotly.js/dist/extras/mathjax/MathJax.js?config=TeX-AMS-MML_SVG "> </ script >
66< script type ="text/javascript " src ="../plotly.js/build/plotly.js " charset ="utf-8 "> </ script >
77< script type ="text/javascript " src ="../plotly.js/dist/plotly-geo-assets.js " charset ="utf-8 "> </ script >
8- < script type ="text/javascript " src ="../plotly.js/build/set_plot_config.js "> </ script >
98< script type ="text/javascript " src ="./main.js "> </ script >
109</ body >
1110</ html >
You can’t perform that action at this time.
0 commit comments