Move wait for workbench restoration to Application (#197053)

#195850: Move wait for workbench restoration to
Application#checkWindowReady
This commit is contained in:
Sandeep Somavarapu 2023-10-31 09:00:40 +01:00 committed by GitHub
parent 0279c52a02
commit bee0ea18bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 4 deletions

View file

@ -120,6 +120,9 @@ export class Application {
await measureAndLog(() => code.didFinishLoad(), 'Application#checkWindowReady: wait for navigation to be committed', this.logger);
await measureAndLog(() => code.waitForElement('.monaco-workbench'), 'Application#checkWindowReady: wait for .monaco-workbench element', this.logger);
// Wait for workbench to be restored
await this.code.whenWorkbenchRestored();
// Remote but not web: wait for a remote connection state change
if (this.remote) {
await measureAndLog(() => code.waitForTextContent('.monaco-workbench .statusbar-item[id="status.host"]', undefined, statusHostLabel => {

View file

@ -198,9 +198,6 @@ export class QuickAccess {
this.code.logger.log(`QuickAccess: No matching commands, will retry...`);
await this.quickInput.closeQuickInput();
// Wait for workbench to be restored
await this.code.whenWorkbenchRestored();
let retries = 0;
while (++retries < 5) {
hasCommandFound = await openCommandPalletteAndTypeCommand();
@ -218,7 +215,6 @@ export class QuickAccess {
}
}
// wait and click on best choice
await this.quickInput.selectQuickInputElement(0, keepOpen);
}