@@ -12,6 +12,9 @@ import { IFileService } from 'vs/platform/files/common/files';
12
12
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation' ;
13
13
import localizedStrings from 'vs/platform/languagePacks/common/localizedStrings' ;
14
14
import { ILogFile , getLogs } from 'vs/platform/log/browser/log' ;
15
+ import { ILogService } from 'vs/platform/log/common/log' ;
16
+ import { Registry } from 'vs/platform/registry/common/platform' ;
17
+ import { IWorkbenchContributionsRegistry , Extensions as WorkbenchExtensions } from 'vs/workbench/common/contributions' ;
15
18
import { IWindowDriver , IElement , ILocaleInfo , ILocalizedStrings } from 'vs/workbench/services/driver/common/driver' ;
16
19
import { ILifecycleService , LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle' ;
17
20
@@ -21,15 +24,20 @@ export class BrowserWindowDriver implements IWindowDriver {
21
24
@IFileService private readonly fileService : IFileService ,
22
25
@IEnvironmentService private readonly environmentService : IEnvironmentService ,
23
26
@ILifecycleService private readonly lifecycleService : ILifecycleService ,
27
+ @ILogService private readonly logService : ILogService
24
28
) {
25
29
}
26
30
27
31
async getLogs ( ) : Promise < ILogFile [ ] > {
28
32
return getLogs ( this . fileService , this . environmentService ) ;
29
33
}
30
34
31
- whenWorkbenchRestored ( ) : Promise < void > {
32
- return this . lifecycleService . when ( LifecyclePhase . Restored ) ;
35
+ async whenWorkbenchRestored ( ) : Promise < void > {
36
+ this . logService . info ( '[driver] Waiting for restored lifecycle phase...' ) ;
37
+ await this . lifecycleService . when ( LifecyclePhase . Restored ) ;
38
+ this . logService . info ( '[driver] Restored lifecycle phase reached. Waiting for contributions...' ) ;
39
+ await Registry . as < IWorkbenchContributionsRegistry > ( WorkbenchExtensions . Workbench ) . whenRestored ;
40
+ this . logService . info ( '[driver] Workbench contributions created.' ) ;
33
41
}
34
42
35
43
async setValue ( selector : string , text : string ) : Promise < void > {
0 commit comments