Skip to content

Commit ebfa157

Browse files
committed
add "Using the developer console in karma" section
1 parent 202aab7 commit ebfa157

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

CONTRIBUTING.md

+12-2
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,18 @@ which shows the baseline image, the generated image, the diff and the json mocks
183183

184184
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`.
185185

186-
### Writing interaction tests
186+
### Using the developer console in karma to write/debug jasmine tests
187+
188+
- Click on the `DEBUG` button
189+
- In the `DEBUG RUNNER` window, open the console (e.g. with `<ctrl-shift-j>`)
190+
- Find test file (e.g. with `<ctrl-o>` + typing the name of the file), look out
191+
for "bundled" files with the same name.
192+
- Set `debugger` on relevant line(s)
193+
- Rerun the test suite by refreshing the page (e.g. with `<crtl-r>`)
194+
195+
![Peek 2020-03-11 10-45](https://user-images.githubusercontent.com/6675409/76438118-f2502300-6390-11ea-88d2-17a553c3b4e8.gif)
196+
197+
### Writing jasmine interaction tests
187198

188199
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,
189200
it may be necessary to fix the width, height, margins, X axis range and Y axis range of the plot. For example:
@@ -205,7 +216,6 @@ This will produce the following plot, and say you want to simulate a selection p
205216

206217
<img src="https://user-images.githubusercontent.com/31989842/38890553-0bc6190c-4282-11e8-8efc-077bf05ca565.png">
207218

208-
209219
## Repo organization
210220

211221
- Distributed files are in `dist/`

0 commit comments

Comments
 (0)