mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-22 17:48:56 +01:00
notebookEditor.visible
This commit is contained in:
@@ -163,12 +163,28 @@ suite('API tests', () => {
|
||||
await vscode.commands.executeCommand('vscode.openWith', resource, 'notebookCoreTest');
|
||||
const firstEditor = vscode.notebook.activeNotebookEditor;
|
||||
assert.equal(firstEditor?.active, true);
|
||||
assert.equal(firstEditor?.visible, true);
|
||||
|
||||
await vscode.commands.executeCommand('workbench.action.splitEditor');
|
||||
const secondEditor = vscode.notebook.activeNotebookEditor;
|
||||
assert.equal(secondEditor?.active, true);
|
||||
assert.equal(secondEditor?.visible, true);
|
||||
assert.equal(firstEditor?.active, false);
|
||||
|
||||
assert.equal(vscode.notebook.visibleNotebookEditors.length, 2);
|
||||
|
||||
await vscode.commands.executeCommand('workbench.action.files.newUntitledFile');
|
||||
assert.equal(firstEditor?.visible, true);
|
||||
assert.equal(firstEditor?.active, false);
|
||||
assert.equal(secondEditor?.visible, false);
|
||||
assert.equal(secondEditor?.active, false);
|
||||
assert.equal(vscode.notebook.visibleNotebookEditors.length, 1);
|
||||
|
||||
await vscode.commands.executeCommand('workbench.action.closeActiveEditor');
|
||||
assert.equal(secondEditor?.active, true);
|
||||
assert.equal(secondEditor?.visible, true);
|
||||
assert.equal(vscode.notebook.visibleNotebookEditors.length, 2);
|
||||
|
||||
await vscode.commands.executeCommand('workbench.action.files.save');
|
||||
await vscode.commands.executeCommand('workbench.action.closeAllEditors');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user