Skip to content

Commit 7e3ac00

Browse files
committed
Improve code formatting, update diagram, generalize terminology to "interaction tests"
1 parent 203f35d commit 7e3ac00

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

Diff for: CONTRIBUTING.md

+11-16
Original file line numberDiff line numberDiff line change
@@ -177,31 +177,26 @@ which shows the baseline image, the generated image, the diff and the json mocks
177177

178178
To view the results of a run on CircleCI, download the `build/test_images/` and `build/test_images_diff/` artifacts into your local repo and then run `npm run start-image_viewer`.
179179

180-
### Writing selection tests
181-
Keep in mind that the selection coordinates are relative to the top-left corner of the plot, including the margins. To produce a reliable selection test,
180+
### Writing interaction tests
181+
Keep in mind that the interaction coordinates are relative to the top-left corner of the plot, including the margins. To produce a reliable interaction test,
182182
it may be necessary to to fix the width, height, margins, X axis range and Y axis range of the plot. For example:
183183

184184
```
185-
Plotly.newPlot(gd,
186-
[
187-
{
185+
Plotly.newPlot(gd, [{
188186
x: [1, 1, 1, 2, 2, 2, 3, 3, 3],
189187
y: [1, 2, 3, 1, 2, 3, 1, 2, 3],
190188
mode: 'markers'
191-
}
192-
],
193-
{
194-
width: 400, height: 400,
195-
margin: {l: 100, r: 100, t: 100, b: 100},
196-
xaxis: {range: [0, 4]},
197-
yaxis: {range: [0, 4]}
198-
}
199-
)
189+
}], {
190+
width: 400, height: 400,
191+
margin: {l: 100, r: 100, t: 100, b: 100},
192+
xaxis: {range: [0, 4]},
193+
yaxis: {range: [0, 4]}
194+
});
200195
```
201196

202-
This will produce the following plot, and you want to simulate a selection path of (175, 175) to (225, 225):
197+
This will produce the following plot, and say you want to simulate a selection path of (175, 175) to (225, 225):
203198

204-
<img src="https://user-images.githubusercontent.com/31989842/38889542-5303cf9c-427f-11e8-93a2-16ce2e29f521.png">
199+
<img src="https://user-images.githubusercontent.com/31989842/38890553-0bc6190c-4282-11e8-8efc-077bf05ca565.png">
205200

206201

207202
## Repo organization

0 commit comments

Comments
 (0)