Notebooks View: Do not recenter view when selecting a notebook that is visible (#15442)

* do not focus element when tree item is visible

* reset reveal behavior

* add comment
This commit is contained in:
Barbara Valdez
2021-05-13 10:19:19 -07:00
committed by GitHub
parent ca81290aa1
commit 558dfd693c
3 changed files with 17 additions and 10 deletions

View File

@@ -244,7 +244,7 @@ describe('BooksTreeViewTests', function () {
it('revealActiveDocumentInViewlet should return correct bookItem for highlight', async () => {
let notebook1Path = path.join(rootFolderPath, 'Book', 'content', 'notebook1.ipynb').replace(/\\/g, '/');
let currentSelection = await bookTreeViewProvider.findAndExpandParentNode(notebook1Path);
let currentSelection = await bookTreeViewProvider.findAndExpandParentNode(notebook1Path, true);
should(currentSelection).not.be.undefined();
equalBookItems(currentSelection, expectedNotebook1);
});
@@ -329,7 +329,7 @@ describe('BooksTreeViewTests', function () {
it('revealActiveDocumentInViewlet should return correct bookItem for highlight', async () => {
let notebook1Path = path.join(rootFolderPath, 'Book', 'content', 'notebook1.ipynb').replace(/\\/g, '/');
let currentSelection = await providedbookTreeViewProvider.findAndExpandParentNode(notebook1Path);
let currentSelection = await providedbookTreeViewProvider.findAndExpandParentNode(notebook1Path, true);
should(currentSelection).not.be.undefined();
equalBookItems(currentSelection, expectedNotebook1);
});