3
3
Test plotly.js with Plotly's image testing docker container.
4
4
5
5
Requirements:
6
+
6
7
- ` docker ` | [ installation guidelines] [ docker-install ]
7
8
- ` docker-machine ` (for Mac and Windows users only) | [ installation guidelines] [ docker-machine-install ]
8
9
@@ -28,7 +29,6 @@ eval $(docker-machine env default)
28
29
29
30
the above evaluates the output of ` docker-machine env default ` .
30
31
31
-
32
32
### Step 1: Setup the testing container
33
33
34
34
After ` cd ` into your ` plotly.js ` directory, pull the latest docker image with
@@ -49,7 +49,6 @@ npm run docker -- run
49
49
which calls [ ` docker-run ` ] [ docker-run ] or [ ` docker-start ` ] [ docker-start ] with
50
50
the correct arguments.
51
51
52
-
53
52
### Step 2: Run the image tests
54
53
55
54
The image testing docker container allows plotly.js developers to
@@ -60,7 +59,7 @@ The image testing docker container allows plotly.js developers to
60
59
Before starting, don't forget to [ set up your testing environment] ( https://github.com/plotly/plotly.js/blob/master/CONTRIBUTING.md#development ) :
61
60
62
61
``` bash
63
- $ npm run pretest
62
+ npm run pretest
64
63
```
65
64
66
65
** IMPORTANT:** the image tests scripts do ** not** bundle the source files before
@@ -91,10 +90,10 @@ For example,
91
90
92
91
``` bash
93
92
# Run one test (e.g. the 'contour_nolines' test):
94
- $ npm run test-image -- contour_nolines
93
+ npm run test-image -- contour_nolines
95
94
96
95
# Run all gl3d image tests in batch:
97
- $ npm run test-image -- gl3d_*
96
+ npm run test-image -- gl3d_*
98
97
99
98
# Run all image tests that are not gl3d in batch:
100
99
npm run test-image -- " \!\(gl3d_\)*"
@@ -106,7 +105,7 @@ comparison tests in queue (i.e. with no concurrency) is recommended:
106
105
107
106
``` bash
108
107
# Run all gl3d image test in queue:
109
- $ npm run test-image -- gl3d_* --queue
108
+ npm run test-image -- gl3d_* --queue
110
109
```
111
110
112
111
##### B: Run image export tests
@@ -141,7 +140,6 @@ To update existing baseline image(s), run
141
140
npm run baseline -- < glob-of-mocks-to-update>
142
141
```
143
142
144
-
145
143
### Step 3: Stop your testing container
146
144
147
145
Once done testing, inside your ` plotly.js ` directory, run
@@ -204,11 +202,11 @@ If named `default`:
204
202
docker-machine kill default
205
203
```
206
204
207
- For more comprehensive information about docker, please refer to the [ docker docs] ( http ://docs.docker.com/) .
205
+ For more comprehensive information about docker, please refer to the [ docker docs] ( https ://docs.docker.com/) .
208
206
209
207
[ mocks ] : https://github.com/plotly/plotly.js/tree/master/test/image/mocks
210
208
[ baselines ] : https://github.com/plotly/plotly.js/tree/master/test/image/baselines
211
- [ docker-install ] : http ://docs.docker.com/engine/installation/
209
+ [ docker-install ] : https ://docs.docker.com/engine/installation/
212
210
[ docker-machine-install ] : https://docs.docker.com/machine/install-machine/
213
211
[ docker-hub ] : https://hub.docker.com/r/plotly/testbed/tags/
214
212
[ docker-pull ] : https://docs.docker.com/engine/reference/commandline/pull/
0 commit comments