()
| 18 | }); |
| 19 | |
| 20 | async function runTest() { |
| 21 | const graph = (await getCursorlessApi()).graph!; |
| 22 | |
| 23 | await openNewNotebookEditor(['"hello"', '"world"']); |
| 24 | |
| 25 | // FIXME: There seems to be some timing issue when you create a notebook |
| 26 | // editor |
| 27 | await sleep(1000); |
| 28 | |
| 29 | await graph.hatTokenMap.addDecorations(); |
| 30 | |
| 31 | await vscode.commands.executeCommand( |
| 32 | "cursorless.command", |
| 33 | "take whale", |
| 34 | "setSelection", |
| 35 | [ |
| 36 | { |
| 37 | type: "primitive", |
| 38 | mark: { |
| 39 | type: "decoratedSymbol", |
| 40 | symbolColor: "default", |
| 41 | character: "w", |
| 42 | }, |
| 43 | }, |
| 44 | ] |
| 45 | ); |
| 46 | |
| 47 | const editor = vscode.window.activeTextEditor; |
| 48 | |
| 49 | if (editor == null) { |
| 50 | assert(false, "No editor was focused"); |
| 51 | } |
| 52 | |
| 53 | assert.deepStrictEqual(editor.document.getText(editor.selection), "world"); |
| 54 | } |
nothing calls this directly
no test coverage detected