notebookEditor.active

This commit is contained in:
rebornix
2020-05-19 16:55:31 -07:00
parent 5d59a2e671
commit 8e02737abc
3 changed files with 62 additions and 0 deletions

View File

@@ -157,6 +157,21 @@ suite('API tests', () => {
await vscode.commands.executeCommand('workbench.action.files.save');
await vscode.commands.executeCommand('workbench.action.closeAllEditors');
});
test('notebook editor active/visible', async function () {
const resource = vscode.Uri.parse(join(vscode.workspace.rootPath || '', './first.vsctestnb'));
await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest');
const firstEditor = vscode.notebook.activeNotebookEditor;
assert.equal(firstEditor?.active, true);
await vscode.commands.executeCommand('workbench.action.splitEditor');
const secondEditor = vscode.notebook.activeNotebookEditor;
assert.equal(secondEditor?.active, true);
assert.equal(firstEditor?.active, false);
await vscode.commands.executeCommand('workbench.action.files.save');
await vscode.commands.executeCommand('workbench.action.closeAllEditors');
});
});
suite('notebook workflow', () => {