mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
smoke - update didFinishLoad solution (#175409)
This commit is contained in:
@@ -117,7 +117,7 @@ export class Application {
|
||||
private async checkWindowReady(code: Code): Promise<void> {
|
||||
|
||||
// We need a rendered workbench
|
||||
// await measureAndLog(() => code.didFinishLoad(), 'Application#checkWindowReady: wait for navigation to be committed', this.logger); // TODO this seems to fail ever since utility process is on by default
|
||||
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);
|
||||
|
||||
// Remote but not web: wait for a remote connection state change
|
||||
|
||||
@@ -84,11 +84,8 @@ export class PlaywrightDriver {
|
||||
return this.page.waitForLoadState('load');
|
||||
}
|
||||
|
||||
// Desktop: via `window` event
|
||||
return new Promise<void>(resolve => {
|
||||
// https://playwright.dev/docs/api/class-electronapplication#electron-application-event-window
|
||||
(this.application as playwright.ElectronApplication).on('window', () => resolve());
|
||||
});
|
||||
// Desktop: already loaded when `electron.firstWindow()` returns
|
||||
return;
|
||||
}
|
||||
|
||||
private async takeScreenshot(name: string): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user