use showNotebookDocument instead of command, maybe https://github.com/microsoft/vscode/issues/122851

This commit is contained in:
Johannes Rieken
2021-05-04 14:36:53 +02:00
parent a29dc73f31
commit f249c1db60

View File

@@ -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;