You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/image/README.md
+13-5Lines changed: 13 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -26,8 +26,7 @@ the above evaluates the output of `docker-machine env default`.
26
26
27
27
### Step 1: Run the testing container
28
28
29
-
Plotly.js uses `docker-compose` to ease the creation/stopping/deletion of testing docker container.
30
-
29
+
Plotly.js uses `docker-compose` to ease the creation/stopping/deletion of the testing docker container.
31
30
32
31
Inside your `plotly.js` directory, run
33
32
@@ -39,8 +38,7 @@ In the `docker-compose.yml` file, `latest` is the latest Plotly Image-Server doc
39
38
as listed on [hub.docker.com](https://hub.docker.com/r/plotly/imageserver/tags/) and
40
39
`imagetest` is the name of the docker container. The `-d` flag tells docker to start the containers in the background and leave them running.
41
40
42
-
43
-
### Step 2: Run the tests
41
+
### Step 2: Run the image tests
44
42
45
43
Inside your `plotly.js` directory, run
46
44
@@ -50,6 +48,16 @@ npm run test-image
50
48
51
49
if some tests fail, compare their outputs using `npm run start-image_viewer`.
52
50
51
+
### Step 2b: Make a new baseline image
52
+
53
+
Inside your `plotly.js` directory, run
54
+
55
+
```bash
56
+
npm run baseline -- mock.json
57
+
```
58
+
59
+
where `mock.json` is the name of a `{"data": [], "layout": {}}` json file found in [`test/image/mocks/`](https://github.com/plotly/plotly.js/tree/master/test/image/mocks). The `"data"` and `"layout"` field are passed to `Plotly.plot` to produce an image saved in [`test/image/baslines`](https://github.com/plotly/plotly.js/tree/master/test/image/baselines).
60
+
53
61
### Step 3: Stop your testing container
54
62
55
63
Once done testing, inside your `plotly.js` directory, run
@@ -126,7 +134,7 @@ Inside your `plotly.js` directory, run
0 commit comments