Skip to content

Commit a0bd2c5

Browse files
committed
Cleanup test case recorder docs
1 parent 6665f7d commit a0bd2c5

File tree

1 file changed

+33
-8
lines changed

1 file changed

+33
-8
lines changed

docs/contributing/test-case-recorder.md

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,47 @@ command run, and the final state, all in the form of a yaml document. See
1010

1111
## Initial setup
1212

13-
1. Add a voice command for recording to your personal talon files:
14-
- `cursorless record: user.vscode("cursorless.recordTestCase")`
15-
- We don't want to commit this so add it to your own repository.
16-
1. If you'd like to be able to record tests which check the navigation map, please add the following to your personal talon files:
13+
Add a voice command for recording to your personal talon files:
1714

18-
- https://github.com/pokey/pokey_talon/blob/9298c25dd6d28fd9fcf5ed39f305bc6b93e5f229/apps/vscode/vscode.talon#L468
19-
- https://github.com/pokey/pokey_talon/blob/49643bfa8f62cbec18b5ddad1658f5a28785eb01/apps/vscode/vscode.py#L203-L205
15+
```talon
16+
cursorless record: user.vscode("cursorless.recordTestCase")
17+
```
18+
19+
We don't want to commit this so please add it to your own Talon user file set.
20+
21+
### Configuring the test case Recorder
22+
23+
The test case recorder has several additional configuration options. The default configuration works for most tests, but you may find the following useful.
24+
25+
#### Testing the hat map
26+
27+
We have a way to test that the hats in the hat map update correctly during the course of a single phrase. These tests are also how we usually test our [range updating code](api/modules/core_updateSelections_updateSelections).
28+
29+
Please add the following to your personal talon files:
30+
31+
- https://github.com/pokey/pokey_talon/blob/9298c25dd6d28fd9fcf5ed39f305bc6b93e5f229/apps/vscode/vscode.talon#L468
32+
- https://github.com/pokey/pokey_talon/blob/49643bfa8f62cbec18b5ddad1658f5a28785eb01/apps/vscode/vscode.py#L203-L205
2033

21-
It is quite unlikely you'll need this second step. Most tests don't check the navigation map.
34+
It is quite unlikely you'll need this second step. Most tests don't check the navigation map.
2235

23-
1. If you'd like to be able to record tests which assert on non-matches, please add another command to your personal talon files. See the two files links above for context. Add the command below to your to your `vscode.py` and ensure that there is a matching Talon command.
36+
#### Capturing errors
37+
38+
We support recording tests where the expected result is an error
39+
40+
Please add a command to your personal talon files. See the two files links above for context. Add the command below to your to your `vscode.py` and ensure that there is a matching Talon command.
2441

2542
```
2643
actions.user.vscode_with_plugin("cursorless.recordTestCase", {"recordErrors": True})
2744
```
2845

46+
#### Testing decoration highlights
47+
48+
We support testing our decoration highlights, eg the flash of red when something is deleted. If you'd like to be able to record tests which check our decoration highlights, please add another command to your personal talon files. See the two files links above for context. Add the command below to your to your `vscode.py` and ensure that there is a matching Talon command.
49+
50+
```
51+
actions.user.vscode_with_plugin("cursorless.recordTestCase", {"isDecorationsTest": True})
52+
```
53+
2954
## Recording new tests
3055

3156
1. Start debugging (F5)

0 commit comments

Comments
 (0)