Skip to content

Commit c5c5d80

Browse files
authored
Remove fullTargets from tests (#1700)
- Fixes #1666 Generated by applying this patch: ```patch From 49eccc47ae107ae4de2c4dc0473e19c6a78e8e90 Mon Sep 17 00:00:00 2001 From: Pokey Rule <[email protected]> Date: Mon, 31 Jul 2023 15:24:40 +0100 Subject: [PATCH] Script to remove `fullTargets` --- .../src/scripts/transformRecordedTests/index.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/cursorless-engine/src/scripts/transformRecordedTests/index.ts b/packages/cursorless-engine/src/scripts/transformRecordedTests/index.ts index 586453e..33e7128d1 100644 --- a/packages/cursorless-engine/src/scripts/transformRecordedTests/index.ts +++ b/packages/cursorless-engine/src/scripts/transformRecordedTests/index.ts @@ -3,14 +3,19 @@ import { identity } from "./transformations/identity"; import { upgrade } from "./transformations/upgrade"; import { transformFile } from "./transformFile"; import { FixtureTransformation } from "./types"; -import { upgradeDecorations } from "./upgradeDecorations"; import { checkMarks } from "./checkMarks"; + +const custom: FixtureTransformation= (fixture) => { + delete (fixture as any)["fullTargets"]; + return fixture; +} + const AVAILABLE_TRANSFORMATIONS: Record<string, FixtureTransformation> = { upgrade, format: identity, ["check-marks"]: checkMarks, - custom: upgradeDecorations, + custom, }; async function main(args: string[]) { -- 2.40.0 ``` And then running: ```sh pnpm transform-recorded-tests --custom ``` ## 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 bd965de commit c5c5d80

File tree

2,354 files changed

+0
-2354
lines changed

Some content is hidden

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

2,354 files changed

+0
-2354
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,3 @@ finalState:
5959
end: {line: 2, character: 8}
6060
isReversed: false
6161
hasExplicitRange: true
62-
fullTargets: [{type: list, elements: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: h}, selectionType: line, position: contents, insideOutsideType: null, modifier: {type: identity}, isImplicit: false}, {type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: w}, selectionType: line, position: contents, insideOutsideType: null, modifier: {type: identity}, isImplicit: false}]}, {type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: null, modifier: {type: identity}, isImplicit: true}]

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,3 @@ ide:
3737
- type: character
3838
start: {line: 0, character: 0}
3939
end: {line: 0, character: 5}
40-
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: h}, modifiers: []}]

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,3 @@ finalState:
6868
end: {line: 2, character: 1}
6969
isReversed: false
7070
hasExplicitRange: true
71-
fullTargets: [{type: list, elements: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: a}, selectionType: token, position: contents, insideOutsideType: null, modifier: {type: identity}}, {type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: b}, selectionType: token, position: contents, insideOutsideType: null, modifier: {type: identity}}, {type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: c}, selectionType: token, position: contents, insideOutsideType: null, modifier: {type: identity}}]}, {type: primitive, mark: {type: cursor}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: identity}}]

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,3 @@ finalState:
7474
end: {line: 2, character: 1}
7575
isReversed: false
7676
hasExplicitRange: true
77-
fullTargets: [{type: list, elements: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: a}, selectionType: token, position: contents, insideOutsideType: null, modifier: {type: identity}}, {type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: b}, selectionType: token, position: contents, insideOutsideType: null, modifier: {type: identity}}, {type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: c}, selectionType: token, position: contents, insideOutsideType: null, modifier: {type: identity}}]}, {type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: d}, selectionType: token, position: after, insideOutsideType: null, modifier: {type: identity}}]

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,3 @@ finalState:
7575
end: {line: 2, character: 1}
7676
isReversed: false
7777
hasExplicitRange: true
78-
fullTargets: [{type: list, elements: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: a}, selectionType: token, position: contents, insideOutsideType: null, modifier: {type: identity}}, {type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: b}, selectionType: token, position: contents, insideOutsideType: null, modifier: {type: identity}}, {type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: c}, selectionType: token, position: contents, insideOutsideType: null, modifier: {type: identity}}]}, {type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: e}, selectionType: token, position: after, insideOutsideType: null, modifier: {type: containingScope, scopeType: collectionItem, includeSiblings: false}}]

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,3 @@ finalState:
7474
end: {line: 2, character: 1}
7575
isReversed: false
7676
hasExplicitRange: true
77-
fullTargets: [{type: list, elements: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: a}, selectionType: token, position: contents, insideOutsideType: null, modifier: {type: identity}}, {type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: b}, selectionType: token, position: contents, insideOutsideType: null, modifier: {type: identity}}, {type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: c}, selectionType: token, position: contents, insideOutsideType: null, modifier: {type: identity}}]}, {type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: d}, selectionType: token, position: before, insideOutsideType: null, modifier: {type: identity}}]

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,3 @@ finalState:
7575
end: {line: 2, character: 1}
7676
isReversed: false
7777
hasExplicitRange: true
78-
fullTargets: [{type: list, elements: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: a}, selectionType: token, position: contents, insideOutsideType: null, modifier: {type: identity}}, {type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: b}, selectionType: token, position: contents, insideOutsideType: null, modifier: {type: identity}}, {type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: c}, selectionType: token, position: contents, insideOutsideType: null, modifier: {type: identity}}]}, {type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: e}, selectionType: token, position: before, insideOutsideType: null, modifier: {type: containingScope, scopeType: collectionItem, includeSiblings: false}}]

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,3 @@ finalState:
5656
end: {line: 1, character: 16}
5757
isReversed: false
5858
hasExplicitRange: true
59-
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: m}, modifiers: [&ref_0 {type: containingScope, scopeType: {type: argumentOrParameter}}]}, {type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: l}, modifiers: [{type: position, position: after}, *ref_0]}]

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,3 @@ finalState:
5454
end: {line: 1, character: 16}
5555
isReversed: false
5656
hasExplicitRange: true
57-
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: m}, modifiers: [&ref_0 {type: containingScope, scopeType: {type: argumentOrParameter}}]}, {type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: v}, modifiers: [{type: position, position: after}, *ref_0]}]

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,3 @@ finalState:
5656
end: {line: 4, character: 21}
5757
isReversed: false
5858
hasExplicitRange: true
59-
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: w}, modifiers: [&ref_0 {type: containingScope, scopeType: {type: argumentOrParameter}}]}, {type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: l}, modifiers: [{type: position, position: before}, *ref_0]}]

0 commit comments

Comments
 (0)