-
-
Notifications
You must be signed in to change notification settings - Fork 84
Make test case recorder #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
code quality
Improvements to code quality
Milestone
Comments
Closed
Note that we'll probably want to finish #69 before we record any test cases as that will change the wire format from talon |
Use this to test:
|
Merged
To test:
|
|
|
|
Merged
To test
|
More to add:
|
|
|
|
|
This was referenced Aug 6, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Goal: to make it super lightweight to make a new test case so that you don’t think twice about it, while keeping them robust enough not to rot if we rework internals
New command
cursorless.recordTestCase
, which asks for a test case name / maybe directoryWaits for next cursorless command
On next cursorless command, takes a snapshot of current file, including cursor locations, visible lines, file type, and relevant decorations
Takes snapshot after cursorless command, including cursor and visible lines
Saves before, command, context, and after as a test case
Then add code that can parse this type of fixture and run it as a test
I'd argue that cursorless command should be captured pre-inference, but don't feel strongly
This technique can be used for testing transformations, inside / outside, actions, etc
For example, to check whether the delimiter / inside outside stuff is working for eg "type" transformation, can run the command with "take" and "Chuck". This makes it robust to changes in internal representations, at the expense of being slightly less granular
Also save highlights to make sure those don't break?
could then also use these test cases to automatically record GIFs (Make GIF generator using existing test cases #215)
let's use this one to capture Add type transformation #32 (comment) as a test case
Extra credit is:
Follow-on issues filed:
The text was updated successfully, but these errors were encountered: