From c28ea165cd1d9d17b0c01322e2a23a7fa4e21561 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Wed, 4 Aug 2021 15:32:21 +0200 Subject: [PATCH] smoke tests - try other ways of ensuring the editor is open for data migration (#129279) --- test/automation/src/application.ts | 7 +------ .../smoke/src/areas/workbench/data-migration.test.ts | 12 +++++------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/test/automation/src/application.ts b/test/automation/src/application.ts index 1747f3d872f..b4493284a62 100644 --- a/test/automation/src/application.ts +++ b/test/automation/src/application.ts @@ -70,14 +70,9 @@ export class Application { return this._userDataPath; } - async start(expectWalkthroughPart = true): Promise { + async start(): Promise { await this._start(); await this.code.waitForElement('.explorer-folders-view'); - - // https://github.com/microsoft/vscode/issues/118748 - // if (expectWalkthroughPart) { - // await this.code.waitForElement(`.editor-instance > div > div.welcomePageFocusElement[tabIndex="0"]`); - // } } async restart(options: { workspaceOrFolder?: string, extraArgs?: string[] }): Promise { diff --git a/test/smoke/src/areas/workbench/data-migration.test.ts b/test/smoke/src/areas/workbench/data-migration.test.ts index d3af6f80797..390cf30907d 100644 --- a/test/smoke/src/areas/workbench/data-migration.test.ts +++ b/test/smoke/src/areas/workbench/data-migration.test.ts @@ -31,7 +31,7 @@ export function setup(opts: ParsedArgs, testDataPath: string) { stableOptions.quality = Quality.Stable; const stableApp = new Application(stableOptions); - await stableApp!.start(); + await stableApp.start(); // Open 3 editors and pin 2 of them await stableApp.workbench.quickaccess.openFile('www'); @@ -48,10 +48,10 @@ export function setup(opts: ParsedArgs, testDataPath: string) { insiderOptions.userDataDir = userDataDir; const insidersApp = new Application(insiderOptions); - await insidersApp!.start(false /* not expecting walkthrough path */); + await insidersApp.start(); // Verify 3 editors are open - await insidersApp.workbench.editors.waitForEditorFocus('Untitled-1'); + await insidersApp.workbench.editors.selectTab('Untitled-1'); await insidersApp.workbench.editors.selectTab('app.js'); await insidersApp.workbench.editors.selectTab('www'); @@ -72,7 +72,7 @@ export function setup(opts: ParsedArgs, testDataPath: string) { stableOptions.quality = Quality.Stable; const stableApp = new Application(stableOptions); - await stableApp!.start(); + await stableApp.start(); await stableApp.workbench.editors.newUntitledFile(); @@ -91,13 +91,11 @@ export function setup(opts: ParsedArgs, testDataPath: string) { insiderOptions.userDataDir = userDataDir; const insidersApp = new Application(insiderOptions); - await insidersApp!.start(false /* not expecting walkthrough path */); + await insidersApp.start(); - await insidersApp.workbench.editors.waitForTab(readmeMd, true); await insidersApp.workbench.editors.selectTab(readmeMd); await insidersApp.workbench.editor.waitForEditorContents(readmeMd, c => c.indexOf(textToType) > -1); - await insidersApp.workbench.editors.waitForTab(untitled, true); await insidersApp.workbench.editors.selectTab(untitled); await insidersApp.workbench.editor.waitForEditorContents(untitled, c => c.indexOf(textToTypeInUntitled) > -1);