testing: show hidden tests if reveal is requested for a hidden test

Fixes  #117481
This commit is contained in:
Connor Peet 2021-02-23 17:44:16 -08:00
parent c2e66ea569
commit c5edf95dc6
No known key found for this signature in database
GPG key ID: CF8FD2EA0DBC61BD

View file

@ -434,6 +434,14 @@ export class TestingExplorerViewModel extends Disposable {
return;
}
// reveal the test if it's hidden, #117481
for (let n: ITestTreeElement | null = item; n; n = n.parentItem) {
if (n.test && this.testService.excludeTests.value.has(n.test.item.extId)) {
this.filterState.showExcludedTests.value = true;
break;
}
}
setTimeout(() => this.revealItem(item, true), 1);
this.filterState.reveal.value = undefined;
this.hasPendingReveal = false;