Skip to content

Commit

Permalink
use showNotebookDocument instead of command, maybe #122851
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed May 4, 2021
1 parent a29dc73 commit f249c1d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -804,12 +804,12 @@ suite('Notebook API tests', function () {
};

const resource = await createRandomNotebookFile();
await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest');
const editor = vscode.window.activeNotebookEditor!;
const editor = await vscode.window.showNotebookDocument(resource);
const cell = editor.document.cellAt(0);

await assertKernel(cancelableKernel.controller);
await withEvent<vscode.NotebookCellOutputsChangeEvent>(vscode.notebook.onDidChangeCellOutputs, async (event) => {
assert.ok(editor === vscode.window.activeNotebookEditor);
await vscode.commands.executeCommand('notebook.cell.execute');
await vscode.commands.executeCommand('notebook.cell.cancelExecution');
await event;
Expand Down

0 comments on commit f249c1d

Please sign in to comment.