less openWith-command, more editor asserting, https://github.com/microsoft/vscode/issues/122851

This commit is contained in:
Johannes Rieken
2021-05-05 08:32:06 +02:00
parent d639345791
commit 8a41ae1d93

View File

@@ -851,13 +851,13 @@ 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(interruptableKernel.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;