Select active notebook in viewlet when opened from command pallet (#15027)

* await initialized

* fixes specific for windows

* address comments

* update comment
This commit is contained in:
Maddy
2021-04-08 15:27:33 -07:00
committed by GitHub
parent d76a6698a9
commit 7484b04158
3 changed files with 24 additions and 14 deletions

View File

@@ -233,7 +233,7 @@ describe('BooksTreeViewTests', function () {
});
it.skip('getParent should return when element is a valid child notebook', async () => {
it('getParent should return when element is a valid child notebook', async () => {
let parent = await bookTreeViewProvider.getParent();
should(parent).be.undefined();
@@ -243,8 +243,9 @@ describe('BooksTreeViewTests', function () {
});
it('revealActiveDocumentInViewlet should return correct bookItem for highlight', async () => {
let notebook1Path = vscode.Uri.file(path.join(rootFolderPath, 'Book', 'content', 'notebook1.ipynb')).fsPath;
let notebook1Path = path.join(rootFolderPath, 'Book', 'content', 'notebook1.ipynb').replace(/\\/g, '/');
let currentSelection = await bookTreeViewProvider.findAndExpandParentNode(notebook1Path);
should(currentSelection).not.be.undefined();
equalBookItems(currentSelection, expectedNotebook1);
});
@@ -327,8 +328,9 @@ describe('BooksTreeViewTests', function () {
});
it('revealActiveDocumentInViewlet should return correct bookItem for highlight', async () => {
let notebook1Path = path.join(rootFolderPath, 'Book', 'content', 'notebook1.ipynb');
let notebook1Path = path.join(rootFolderPath, 'Book', 'content', 'notebook1.ipynb').replace(/\\/g, '/');
let currentSelection = await providedbookTreeViewProvider.findAndExpandParentNode(notebook1Path);
should(currentSelection).not.be.undefined();
equalBookItems(currentSelection, expectedNotebook1);
});