Skip to content

Commit 0358863

Browse files
committed
Don't test spoken forms for secret scopes
1 parent 0ac11f9 commit 0358863

28 files changed

+84
-3
lines changed

packages/cursorless-engine/src/generateSpokenForm/generateSpokenForm.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ import { SpokenFormMap, SpokenFormMapEntry } from "../SpokenFormMap";
1717
const spokenFormMap = mapValues(defaultSpokenFormInfo, (entry) =>
1818
mapValues(
1919
entry,
20-
({ defaultSpokenForms }): SpokenFormMapEntry => ({
21-
spokenForms: defaultSpokenForms,
20+
({ defaultSpokenForms, isSecret }): SpokenFormMapEntry => ({
21+
spokenForms: isSecret ? [] : defaultSpokenForms,
2222
isCustom: false,
2323
defaultSpokenForms,
2424
requiresTalonUpdate: false,
25-
isSecret: false,
25+
isSecret,
2626
}),
2727
),
2828
) as SpokenFormMap;

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/inference/takeHarpAndStringEach.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ command:
1111
- type: primitive
1212
modifier: {type: containingScope, scopeType: string}
1313
mark: {type: decoratedSymbol, symbolColor: default, character: e}
14+
spokenFormError: >-
15+
simple scope type type with id string; this is a secret spoken form currently
16+
only for internal experimentation
1417
initialState:
1518
documentContents: |
1619

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/inference/takeHarpPastStringEach.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ command:
1414
mark: {type: decoratedSymbol, symbolColor: default, character: e}
1515
excludeStart: false
1616
excludeEnd: false
17+
spokenFormError: >-
18+
simple scope type type with id string; this is a secret spoken form currently
19+
only for internal experimentation
1720
initialState:
1821
documentContents: |
1922

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/inference/takeStringHarpAndEach.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ command:
1111
mark: {type: decoratedSymbol, symbolColor: default, character: h}
1212
- type: primitive
1313
mark: {type: decoratedSymbol, symbolColor: default, character: e}
14+
spokenFormError: >-
15+
simple scope type type with id string; this is a secret spoken form currently
16+
only for internal experimentation
1417
initialState:
1518
documentContents: |
1619

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/inference/takeStringHarpPastEach.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ command:
1414
mark: {type: decoratedSymbol, symbolColor: default, character: e}
1515
excludeStart: false
1616
excludeEnd: false
17+
spokenFormError: >-
18+
simple scope type type with id string; this is a secret spoken form currently
19+
only for internal experimentation
1720
initialState:
1821
documentContents: |
1922

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/cpp/clearSubject.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ command:
99
- type: containingScope
1010
scopeType: {type: switchStatementSubject}
1111
usePrePhraseSnapshot: true
12+
spokenFormError: >-
13+
simple scope type type with id switchStatementSubject; this is a secret spoken
14+
form currently only for internal experimentation
1215
initialState:
1316
documentContents: |
1417
int main() {

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/cpp/clearSubject2.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ command:
99
- type: containingScope
1010
scopeType: {type: switchStatementSubject}
1111
usePrePhraseSnapshot: false
12+
spokenFormError: >-
13+
simple scope type type with id switchStatementSubject; this is a secret spoken
14+
form currently only for internal experimentation
1215
initialState:
1316
documentContents: |
1417
int main() {

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/cpp/takeString.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ command:
66
targets:
77
- type: primitive
88
modifier: {type: containingScope, scopeType: string}
9+
spokenFormError: >-
10+
simple scope type type with id string; this is a secret spoken form currently
11+
only for internal experimentation
912
initialState:
1013
documentContents: |
1114
char* a = "hello world";

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/csharp/clearSubject.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ command:
99
- type: containingScope
1010
scopeType: {type: switchStatementSubject}
1111
usePrePhraseSnapshot: true
12+
spokenFormError: >-
13+
simple scope type type with id switchStatementSubject; this is a secret spoken
14+
form currently only for internal experimentation
1215
initialState:
1316
documentContents: |-
1417
switch (aaa) {

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/csharp/clearSubject2.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ command:
99
- type: containingScope
1010
scopeType: {type: switchStatementSubject}
1111
usePrePhraseSnapshot: false
12+
spokenFormError: >-
13+
simple scope type type with id switchStatementSubject; this is a secret spoken
14+
form currently only for internal experimentation
1215
initialState:
1316
documentContents: |-
1417
switch (aaa + 1) {

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/go/takeString.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ command:
66
targets:
77
- type: primitive
88
modifier: {type: containingScope, scopeType: string, includeSiblings: false}
9+
spokenFormError: >-
10+
simple scope type type with id string; this is a secret spoken form currently
11+
only for internal experimentation
912
initialState:
1013
documentContents: x := "hello world"
1114
selections:

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/java/clearSubject.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ command:
99
scopeType: {type: switchStatementSubject}
1010
usePrePhraseSnapshot: true
1111
action: {name: clearAndSetSelection}
12+
spokenFormError: >-
13+
simple scope type type with id switchStatementSubject; this is a secret spoken
14+
form currently only for internal experimentation
1215
initialState:
1316
documentContents: |
1417
class Aaa {

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/java/clearSubject2.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ command:
99
scopeType: {type: switchStatementSubject}
1010
usePrePhraseSnapshot: true
1111
action: {name: clearAndSetSelection}
12+
spokenFormError: >-
13+
simple scope type type with id switchStatementSubject; this is a secret spoken
14+
form currently only for internal experimentation
1215
initialState:
1316
documentContents: |
1417
class Aaa {

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/java/takeString.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ command:
66
targets:
77
- type: primitive
88
modifier: {type: containingScope, scopeType: string}
9+
spokenFormError: >-
10+
simple scope type type with id string; this is a secret spoken form currently
11+
only for internal experimentation
912
initialState:
1013
documentContents: |
1114

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/json/takeString.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ command:
66
targets:
77
- type: primitive
88
modifier: {type: containingScope, scopeType: string}
9+
spokenFormError: >-
10+
simple scope type type with id string; this is a secret spoken form currently
11+
only for internal experimentation
912
initialState:
1013
documentContents: |
1114

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/python/clearSubject.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ command:
99
scopeType: {type: switchStatementSubject}
1010
usePrePhraseSnapshot: true
1111
action: {name: clearAndSetSelection}
12+
spokenFormError: >-
13+
simple scope type type with id switchStatementSubject; this is a secret spoken
14+
form currently only for internal experimentation
1215
initialState:
1316
documentContents: |
1417
match 0:

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/python/takeString.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ command:
66
targets:
77
- type: primitive
88
modifier: {type: containingScope, scopeType: string}
9+
spokenFormError: >-
10+
simple scope type type with id string; this is a secret spoken form currently
11+
only for internal experimentation
912
initialState:
1013
documentContents: |
1114

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/python/takeString2.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ command:
66
targets:
77
- type: primitive
88
modifier: {type: containingScope, scopeType: string}
9+
spokenFormError: >-
10+
simple scope type type with id string; this is a secret spoken form currently
11+
only for internal experimentation
912
initialState:
1013
documentContents: |
1114

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/python/takeString3.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ command:
66
targets:
77
- type: primitive
88
modifier: {type: containingScope, scopeType: string}
9+
spokenFormError: >-
10+
simple scope type type with id string; this is a secret spoken form currently
11+
only for internal experimentation
912
initialState:
1013
documentContents: |
1114

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/python/takeString4.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ command:
66
targets:
77
- type: primitive
88
modifier: {type: containingScope, scopeType: string}
9+
spokenFormError: >-
10+
simple scope type type with id string; this is a secret spoken form currently
11+
only for internal experimentation
912
initialState:
1013
documentContents: |
1114

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/rust/changeSubject.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ command:
99
scopeType: {type: switchStatementSubject}
1010
usePrePhraseSnapshot: true
1111
action: {name: clearAndSetSelection}
12+
spokenFormError: >-
13+
simple scope type type with id switchStatementSubject; this is a secret spoken
14+
form currently only for internal experimentation
1215
initialState:
1316
documentContents: |
1417
match user {

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/scala/clearString.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ command:
66
targets:
77
- type: primitive
88
modifier: {type: containingScope, scopeType: string, includeSiblings: false}
9+
spokenFormError: >-
10+
simple scope type type with id string; this is a secret spoken form currently
11+
only for internal experimentation
912
initialState:
1013
documentContents: |
1114
class ExampleClass() {

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/scala/clearString2.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ command:
66
targets:
77
- type: primitive
88
modifier: {type: containingScope, scopeType: string, includeSiblings: false}
9+
spokenFormError: >-
10+
simple scope type type with id string; this is a secret spoken form currently
11+
only for internal experimentation
912
initialState:
1013
documentContents: |
1114
val string = """

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/scala/clearStringOdd.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ command:
77
- type: primitive
88
modifier: {type: containingScope, scopeType: string, includeSiblings: false}
99
mark: {type: decoratedSymbol, symbolColor: default, character: o}
10+
spokenFormError: >-
11+
simple scope type type with id string; this is a secret spoken form currently
12+
only for internal experimentation
1013
initialState:
1114
documentContents: |
1215
class ExampleClass() {

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/scala/clearSubject.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ command:
99
scopeType: {type: switchStatementSubject}
1010
usePrePhraseSnapshot: true
1111
action: {name: clearAndSetSelection}
12+
spokenFormError: >-
13+
simple scope type type with id switchStatementSubject; this is a secret spoken
14+
form currently only for internal experimentation
1215
initialState:
1316
documentContents: |
1417
def matchTest(x: Int): String = x match {

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/typescript/clearSubject.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ command:
99
- type: containingScope
1010
scopeType: {type: switchStatementSubject}
1111
usePrePhraseSnapshot: true
12+
spokenFormError: >-
13+
simple scope type type with id switchStatementSubject; this is a secret spoken
14+
form currently only for internal experimentation
1215
initialState:
1316
documentContents: |-
1417
switch(aaa) {

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/typescript/clearSubject2.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ command:
99
- type: containingScope
1010
scopeType: {type: switchStatementSubject}
1111
usePrePhraseSnapshot: true
12+
spokenFormError: >-
13+
simple scope type type with id switchStatementSubject; this is a secret spoken
14+
form currently only for internal experimentation
1215
initialState:
1316
documentContents: |-
1417
switch(aaa + 1) {

packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/typescript/takeString.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ command:
66
targets:
77
- type: primitive
88
modifier: {type: containingScope, scopeType: string}
9+
spokenFormError: >-
10+
simple scope type type with id string; this is a secret spoken form currently
11+
only for internal experimentation
912
initialState:
1013
documentContents: |
1114

0 commit comments

Comments
 (0)