testing: don't go to source location when expanding/collapsing nodes

Fixes #117479
This commit is contained in:
Connor Peet 2021-02-23 17:47:09 -08:00
parent c5edf95dc6
commit 5713f28801
No known key found for this signature in database
GPG key ID: CF8FD2EA0DBC61BD

View file

@ -354,7 +354,7 @@ export class TestingExplorerViewModel extends Disposable {
this.onDidChangeSelection = this.tree.onDidChangeSelection;
this._register(this.tree.onDidChangeSelection(evt => {
const selected = evt.elements[0];
if (selected && evt.browserEvent) {
if (selected && evt.browserEvent && !selected.children.size) {
this.openEditorForItem(selected);
}
}));