Skip to content

Commit d4de147

Browse files
authored
Add spokenFormError field to recorded tests (#1706)
## Checklist - [ ] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [ ] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [ ] I have not broken the cheatsheet
1 parent 79d34e6 commit d4de147

File tree

78 files changed

+79
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+79
-0
lines changed

packages/common/src/testUtil/serializeTestFixture.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ function reorderFields(
1010
postEditorOpenSleepTimeMs: fixture.postEditorOpenSleepTimeMs,
1111
postCommandSleepTimeMs: fixture.postCommandSleepTimeMs,
1212
command: fixture.command,
13+
spokenFormError: fixture.spokenFormError,
1314
marksToCheck: fixture.marksToCheck,
1415
initialState: fixture.initialState,
1516
finalState: fixture.finalState,

packages/common/src/types/TestCaseFixture.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ interface TestCaseFixtureBase {
1010
languageId: string;
1111
postEditorOpenSleepTimeMs?: number;
1212
postCommandSleepTimeMs?: number;
13+
spokenFormError?: string;
1314

1415
/**
1516
* A list of marks to check in the case of navigation map test otherwise undefined

packages/cursorless-engine/src/testCaseRecorder/TestCase.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ export class TestCase {
4747
private startTimestamp: bigint,
4848
private captureFinalThatMark: boolean,
4949
private extraSnapshotFields?: ExtraSnapshotField[],
50+
private spokenFormError?: string,
5051
) {
5152
const activeEditor = ide().activeTextEditor!;
5253
this.command = command;
@@ -136,6 +137,7 @@ export class TestCase {
136137
postEditorOpenSleepTimeMs: undefined,
137138
postCommandSleepTimeMs: undefined,
138139
command: this.command,
140+
spokenFormError: this.spokenFormError,
139141
marksToCheck: this.marksToCheck,
140142
initialState: this.initialState,
141143
finalState: this.finalState,

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/actions/alternateHighlightHarp.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ command:
99
- type: primitive
1010
mark: {type: decoratedSymbol, symbolColor: default, character: h}
1111
usePrePhraseSnapshot: true
12+
spokenFormError: highlight.highlightId
1213
initialState:
1314
documentContents: hello world
1415
selections:

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/actions/callFine.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ command:
77
- type: primitive
88
mark: {type: decoratedSymbol, symbolColor: default, character: f}
99
- {type: primitive, isImplicit: true}
10+
spokenFormError: Action 'callAsFunction' with argument
1011
initialState:
1112
documentContents: |-
1213
foo;

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/actions/callVest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ command:
77
- type: primitive
88
mark: {type: decoratedSymbol, symbolColor: default, character: v}
99
- {type: primitive, isImplicit: true}
10+
spokenFormError: Action 'callAsFunction' with argument
1011
initialState:
1112
documentContents: |
1213

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/actions/callVestOnCap.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ command:
88
mark: {type: decoratedSymbol, symbolColor: default, character: v}
99
- type: primitive
1010
mark: {type: decoratedSymbol, symbolColor: default, character: c}
11+
spokenFormError: Action 'callAsFunction' with argument
1112
initialState:
1213
documentContents: |
1314

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/actions/customHarp.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ command:
99
extraArgs:
1010
- editor.action.addCommentLine
1111
- {}
12+
spokenFormError: Action 'executeCommand'
1213
initialState:
1314
documentContents: |
1415
hello world

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/actions/defineVest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ command:
99
extraArgs:
1010
- editor.action.revealDefinition
1111
- {restoreSelection: false}
12+
spokenFormError: Action 'executeCommand'
1213
initialState:
1314
documentContents: |
1415
const value = "value";

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/actions/findVest.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ command:
88
mark: {type: decoratedSymbol, symbolColor: default, character: v}
99
extraArgs:
1010
- {showDecorations: null, ensureSingleTarget: true}
11+
spokenFormError: Action 'getText'
1112
initialState:
1213
documentContents: |
1314

0 commit comments

Comments
 (0)