testing: fix test welcome being shown at inappropriate times

Fixes #119675
This commit is contained in:
Connor Peet
2021-03-30 12:18:18 -07:00
parent c79109bff1
commit d6448cfd3a
2 changed files with 10 additions and 0 deletions
@@ -521,6 +521,7 @@ export class TestingExplorerViewModel extends Disposable {
private shouldShowEmptyPlaceholder() {
return !!this.listener
&& this.listener.subscription.busyProviders === 0
&& this.listener.subscription.pendingRootProviders === 0
&& this.listener.subscription.isEmpty;
}
@@ -233,6 +233,7 @@ export class TestService extends Disposable implements ITestService {
this.unsubscribeEmitter.fire(subscription.ident);
const diff = subscription.collection.clear();
subscription.onDiff.fire(diff);
subscription.collection.pendingRootProviders = this.rootProviders.size;
this.subscribeEmitter.fire(subscription.ident);
}
}
@@ -358,6 +359,14 @@ export class MainThreadTestCollection extends AbstractIncrementalTestCollection<
return this.pendingRootCount;
}
/**
* Sets the number of pending root providers.
*/
public set pendingRootProviders(count: number) {
this.pendingRootCount = count;
this.pendingRootChangeEmitter.fire(count);
}
/**
* @inheritdoc
*/