From 8c37ff0ec55478b53d849fe47261a62cf92a11e8 Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Wed, 17 Apr 2024 20:11:45 -0700 Subject: [PATCH] Call onUpdate after full list of tests is received --- packages/trace-viewer/src/ui/teleSuiteUpdater.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/trace-viewer/src/ui/teleSuiteUpdater.ts b/packages/trace-viewer/src/ui/teleSuiteUpdater.ts index 183defca13..6bcc486ad0 100644 --- a/packages/trace-viewer/src/ui/teleSuiteUpdater.ts +++ b/packages/trace-viewer/src/ui/teleSuiteUpdater.ts @@ -82,11 +82,11 @@ export class TeleSuiteUpdater { this.progress.passed = 0; this.progress.failed = 0; this.progress.skipped = 0; - this._options.onUpdate(true); + // Do not call this._options.onUpdate(); here, as we want to wait + // for the test results to be restored in list mode. }, onEnd: () => { - this._options.onUpdate(true); }, onTestBegin: (test: reporterTypes.TestCase, testResult: reporterTypes.TestResult) => { @@ -131,6 +131,7 @@ export class TeleSuiteUpdater { this._receiver.dispatch(message); // After recreating all projects restore previous results. results?.restore(this.rootSuite!); + this._options.onUpdate(true); } processTestReportEvent(message: any) {