Skip to content

Commit 284235b

Browse files
committed
Fixes taken from #1281
1 parent 836787d commit 284235b

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

packages/cursorless-vscode-e2e/suite/recorded.test.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,8 @@ async function runTest(file: string, spyIde: SpyIDE) {
176176
spyIde.activeTextEditor!,
177177
spyIde,
178178
marks,
179-
undefined,
180-
undefined,
181179
// FIXME: Stop overriding the clipboard once we have #559
182-
vscode.env.clipboard,
180+
true,
183181
);
184182

185183
const rawSpyIdeValues = spyIde.getSpyValues(fixture.ide?.flashes != null);

packages/cursorless-vscode/constructTestHelpers.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
CommandServerApi,
33
ExcludableSnapshotField,
4-
ExtraContext,
54
ExtraSnapshotField,
65
IDE,
76
NormalizedIDE,
@@ -43,10 +42,8 @@ export function constructTestHelpers(
4342
extraFields: ExtraSnapshotField[],
4443
editor: TextEditor,
4544
ide: IDE,
46-
marks?: SerializedMarks,
47-
extraContext?: ExtraContext,
48-
metadata?: unknown,
49-
clipboard?: vscode.Clipboard,
45+
marks: SerializedMarks | undefined,
46+
forceRealClipboard: boolean,
5047
): Promise<TestCaseSnapshot> {
5148
return takeSnapshot(
5249
thatMark,
@@ -56,9 +53,9 @@ export function constructTestHelpers(
5653
editor,
5754
ide,
5855
marks,
59-
extraContext,
60-
metadata,
61-
clipboard,
56+
undefined,
57+
undefined,
58+
forceRealClipboard ? vscodeIDE.clipboard : undefined,
6259
);
6360
},
6461

packages/vscode-common/getExtensionApi.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import type {
22
CommandServerApi,
33
ExcludableSnapshotField,
4-
ExtraContext,
54
ExtraSnapshotField,
65
HatTokenMap,
76
IDE,
@@ -41,10 +40,8 @@ export interface TestHelpers {
4140
extraFields: ExtraSnapshotField[],
4241
editor: TextEditor,
4342
ide: IDE,
44-
marks?: SerializedMarks,
45-
extraContext?: ExtraContext,
46-
metadata?: unknown,
47-
clipboard?: vscode.Clipboard,
43+
marks: SerializedMarks | undefined,
44+
forceRealClipboard: boolean,
4845
): Promise<TestCaseSnapshot>;
4946
}
5047

0 commit comments

Comments
 (0)