Skip to content

Converted test recorder for bulk recordings #169

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

Merged
merged 7 commits into from
Aug 1, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added test recordings for actions
  • Loading branch information
AndreasArvidsson committed Aug 1, 2021
commit ddfcce7c38acf991ce14c05c6841f64e8d4da5bb
27 changes: 27 additions & 0 deletions src/test/suite/fixtures/recorded/actions/breakpointCap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
spokenForm: breakpoint cap
languageId: typescript
command:
actionName: setBreakpoint
partialTargets:
- type: primitive
mark: {type: decoratedSymbol, symbolColor: default, character: c}
extraArgs: []
marks:
default.c:
start: {line: 0, character: 0}
end: {line: 0, character: 5}
initialState:
documentContents: "const myVariableValue = \"hello\";\r\n"
selections:
- anchor: {line: 1, character: 0}
active: {line: 1, character: 0}
finalState:
documentContents: "const myVariableValue = \"hello\";\r\n"
selections:
- anchor: {line: 1, character: 0}
active: {line: 1, character: 0}
thatMark:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 5}
returnValue: null
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: c}, selectionType: token, position: contents, modifier: {type: identity}, insideOutsideType: inside}]
33 changes: 33 additions & 0 deletions src/test/suite/fixtures/recorded/actions/bringMade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
spokenForm: bring made
languageId: typescript
command:
actionName: bring
partialTargets:
- type: primitive
mark: {type: decoratedSymbol, symbolColor: default, character: m}
- type: primitive
mark: {type: cursor}
selectionType: token
position: contents
modifier: {type: identity}
insideOutsideType: inside
extraArgs: []
marks:
default.m:
start: {line: 0, character: 6}
end: {line: 0, character: 21}
initialState:
documentContents: "const myVariableValue = \"hello\";\r\n"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. So I don't think it's worth re-recording everything, but I believe if you don't use line feeds these will get turned into block output and be a bit nicer to read. At least I think that's what's happening here. Check out the example yamls

selections:
- anchor: {line: 1, character: 0}
active: {line: 1, character: 0}
finalState:
documentContents: "const myVariableValue = \"hello\";\r\nmyVariableValue"
selections:
- anchor: {line: 1, character: 15}
active: {line: 1, character: 15}
thatMark:
- anchor: {line: 1, character: 15}
active: {line: 1, character: 0}
returnValue: null
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: m}, selectionType: token, position: contents, modifier: {type: identity}, insideOutsideType: null}, {type: primitive, mark: {type: cursor}, selectionType: token, position: contents, modifier: {type: identity}, insideOutsideType: inside}]
32 changes: 32 additions & 0 deletions src/test/suite/fixtures/recorded/actions/bringMadeToCap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
spokenForm: bring made to cap
languageId: typescript
command:
actionName: bring
partialTargets:
- type: primitive
mark: {type: decoratedSymbol, symbolColor: default, character: m}
- type: primitive
mark: {type: decoratedSymbol, symbolColor: default, character: c}
extraArgs: []
marks:
default.m:
start: {line: 0, character: 6}
end: {line: 0, character: 21}
default.c:
start: {line: 0, character: 0}
end: {line: 0, character: 5}
initialState:
documentContents: "const myVariableValue = \"hello\";\r\n"
selections:
- anchor: {line: 1, character: 0}
active: {line: 1, character: 0}
finalState:
documentContents: "myVariableValue myVariableValue = \"hello\";\r\n"
selections:
- anchor: {line: 1, character: 0}
active: {line: 1, character: 0}
thatMark:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 15}
returnValue: null
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: m}, selectionType: token, position: contents, modifier: {type: identity}, insideOutsideType: null}, {type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: c}, selectionType: token, position: contents, modifier: {type: identity}, insideOutsideType: null}]
27 changes: 27 additions & 0 deletions src/test/suite/fixtures/recorded/actions/carveMade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
spokenForm: carve made
languageId: typescript
command:
actionName: cut
partialTargets:
- type: primitive
mark: {type: decoratedSymbol, symbolColor: default, character: m}
extraArgs: []
marks:
default.m:
start: {line: 0, character: 6}
end: {line: 0, character: 21}
initialState:
documentContents: "const myVariableValue = \"hello\";\r\n"
selections:
- anchor: {line: 1, character: 0}
active: {line: 1, character: 0}
finalState:
documentContents: "const = \"hello\";\r\n"
selections:
- anchor: {line: 1, character: 0}
active: {line: 1, character: 0}
thatMark:
- anchor: {line: 0, character: 6}
active: {line: 0, character: 6}
returnValue: null
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: m}, selectionType: token, position: contents, modifier: {type: identity}, insideOutsideType: null}]
27 changes: 27 additions & 0 deletions src/test/suite/fixtures/recorded/actions/chuckMade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
spokenForm: chuck made
languageId: typescript
command:
actionName: delete
partialTargets:
- type: primitive
mark: {type: decoratedSymbol, symbolColor: default, character: m}
extraArgs: []
marks:
default.m:
start: {line: 0, character: 6}
end: {line: 0, character: 21}
initialState:
documentContents: "const myVariableValue = \"hello\";\r\n"
selections:
- anchor: {line: 1, character: 0}
active: {line: 1, character: 0}
finalState:
documentContents: "const = \"hello\";\r\n"
selections:
- anchor: {line: 1, character: 0}
active: {line: 1, character: 0}
thatMark:
- anchor: {line: 0, character: 6}
active: {line: 0, character: 6}
returnValue: null
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: m}, selectionType: token, position: contents, modifier: {type: identity}, insideOutsideType: outside}]
27 changes: 27 additions & 0 deletions src/test/suite/fixtures/recorded/actions/clearMade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
spokenForm: clear made
languageId: typescript
command:
actionName: clear
partialTargets:
- type: primitive
mark: {type: decoratedSymbol, symbolColor: default, character: m}
extraArgs: []
marks:
default.m:
start: {line: 0, character: 6}
end: {line: 0, character: 21}
initialState:
documentContents: "const myVariableValue = \"hello\";\r\n"
selections:
- anchor: {line: 1, character: 0}
active: {line: 1, character: 0}
finalState:
documentContents: "const = \"hello\";\r\n"
selections:
- anchor: {line: 0, character: 6}
active: {line: 0, character: 6}
thatMark:
- anchor: {line: 0, character: 6}
active: {line: 0, character: 6}
returnValue: null
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: m}, selectionType: token, position: contents, modifier: {type: identity}, insideOutsideType: inside}]
27 changes: 27 additions & 0 deletions src/test/suite/fixtures/recorded/actions/commentCap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
spokenForm: comment cap
languageId: typescript
command:
actionName: commentLines
partialTargets:
- type: primitive
mark: {type: decoratedSymbol, symbolColor: default, character: c}
extraArgs: []
marks:
default.c:
start: {line: 0, character: 0}
end: {line: 0, character: 5}
initialState:
documentContents: "const myVariableValue = \"hello\";\r\n"
selections:
- anchor: {line: 1, character: 0}
active: {line: 1, character: 0}
finalState:
documentContents: "// const myVariableValue = \"hello\";\r\n"
selections:
- anchor: {line: 1, character: 0}
active: {line: 1, character: 0}
thatMark:
- anchor: {line: 0, character: 3}
active: {line: 0, character: 8}
returnValue: null
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: c}, selectionType: token, position: contents, modifier: {type: identity}, insideOutsideType: inside}]
27 changes: 27 additions & 0 deletions src/test/suite/fixtures/recorded/actions/dedentCap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
spokenForm: dedent cap
languageId: typescript
command:
actionName: outdentLines
partialTargets:
- type: primitive
mark: {type: decoratedSymbol, symbolColor: default, character: c}
extraArgs: []
marks:
default.c:
start: {line: 0, character: 4}
end: {line: 0, character: 9}
initialState:
documentContents: " const myVariableValue = \"hello\";\r\n"
selections:
- anchor: {line: 1, character: 0}
active: {line: 1, character: 0}
finalState:
documentContents: "const myVariableValue = \"hello\";\r\n"
selections:
- anchor: {line: 1, character: 0}
active: {line: 1, character: 0}
thatMark:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 5}
returnValue: null
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: c}, selectionType: token, position: contents, modifier: {type: identity}, insideOutsideType: inside}]
27 changes: 27 additions & 0 deletions src/test/suite/fixtures/recorded/actions/drinkCap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
spokenForm: drink cap
languageId: typescript
command:
actionName: editNewLineAbove
partialTargets:
- type: primitive
mark: {type: decoratedSymbol, symbolColor: default, character: c}
extraArgs: []
marks:
default.c:
start: {line: 0, character: 0}
end: {line: 0, character: 5}
initialState:
documentContents: "const myVariableValue = \"hello\";\r\n"
selections:
- anchor: {line: 1, character: 0}
active: {line: 1, character: 0}
finalState:
documentContents: "\r\nconst myVariableValue = \"hello\";\r\n"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does VSCode auto-detect line ending type? If not then this will fail in some cases I believe

selections:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 0}
thatMark:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 0}
returnValue: null
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: c}, selectionType: token, position: contents, modifier: {type: identity}, insideOutsideType: outside}]
27 changes: 27 additions & 0 deletions src/test/suite/fixtures/recorded/actions/dropCap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
spokenForm: drop cap
languageId: typescript
command:
actionName: insertEmptyLineAbove
partialTargets:
- type: primitive
mark: {type: decoratedSymbol, symbolColor: default, character: c}
extraArgs: []
marks:
default.c:
start: {line: 0, character: 0}
end: {line: 0, character: 5}
initialState:
documentContents: "const myVariableValue = \"hello\";\r\n"
selections:
- anchor: {line: 1, character: 0}
active: {line: 1, character: 0}
finalState:
documentContents: "\r\nconst myVariableValue = \"hello\";\r\n"
selections:
- anchor: {line: 2, character: 0}
active: {line: 2, character: 0}
thatMark:
- anchor: {line: 1, character: 0}
active: {line: 1, character: 5}
returnValue: null
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: c}, selectionType: token, position: contents, modifier: {type: identity}, insideOutsideType: inside}]
27 changes: 27 additions & 0 deletions src/test/suite/fixtures/recorded/actions/dupeCap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
spokenForm: dupe cap
languageId: typescript
command:
actionName: copyLinesDown
partialTargets:
- type: primitive
mark: {type: decoratedSymbol, symbolColor: default, character: c}
extraArgs: []
marks:
default.c:
start: {line: 0, character: 0}
end: {line: 0, character: 5}
initialState:
documentContents: "const myVariableValue = \"hello\";\r\n"
selections:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 0}
finalState:
documentContents: "const myVariableValue = \"hello\";\r\nconst myVariableValue = \"hello\";\r\n"
selections:
- anchor: {line: 1, character: 0}
active: {line: 1, character: 0}
thatMark:
- anchor: {line: 0, character: 32}
active: {line: 1, character: 4}
returnValue: null
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: c}, selectionType: token, position: contents, modifier: {type: identity}, insideOutsideType: inside}]
27 changes: 27 additions & 0 deletions src/test/suite/fixtures/recorded/actions/dupeUpCap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
spokenForm: dupe up cap
languageId: typescript
command:
actionName: copyLinesUp
partialTargets:
- type: primitive
mark: {type: decoratedSymbol, symbolColor: default, character: c}
extraArgs: []
marks:
default.c:
start: {line: 0, character: 0}
end: {line: 0, character: 5}
initialState:
documentContents: "const myVariableValue = \"hello\";\r\n"
selections:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 0}
finalState:
documentContents: "const myVariableValue = \"hello\";\r\nconst myVariableValue = \"hello\";\r\n"
selections:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 0}
thatMark:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 5}
returnValue: null
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: c}, selectionType: token, position: contents, modifier: {type: identity}, insideOutsideType: inside}]
27 changes: 27 additions & 0 deletions src/test/suite/fixtures/recorded/actions/findAllMade.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
spokenForm: find all made
languageId: typescript
command:
actionName: findInFiles
partialTargets:
- type: primitive
mark: {type: decoratedSymbol, symbolColor: default, character: m}
extraArgs: []
marks:
default.m:
start: {line: 0, character: 6}
end: {line: 0, character: 21}
initialState:
documentContents: "const myVariableValue = \"hello\";\r\n"
selections:
- anchor: {line: 1, character: 0}
active: {line: 1, character: 0}
finalState:
documentContents: "const myVariableValue = \"hello\";\r\n"
selections:
- anchor: {line: 1, character: 0}
active: {line: 1, character: 0}
thatMark:
- anchor: {line: 0, character: 6}
active: {line: 0, character: 21}
returnValue: null
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: m}, selectionType: token, position: contents, modifier: {type: identity}, insideOutsideType: inside}]
Loading