From a11814c57a9c85591444e1b4f1c30bb94a17108b Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 26 Nov 2021 09:22:19 +0100 Subject: [PATCH] smoke - switch away from potentially flaky `editors.selectTab` method --- test/automation/src/quickaccess.ts | 4 ++-- test/smoke/src/areas/workbench/data-migration.test.ts | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/test/automation/src/quickaccess.ts b/test/automation/src/quickaccess.ts index 4d94b595094..17a7c61cd12 100644 --- a/test/automation/src/quickaccess.ts +++ b/test/automation/src/quickaccess.ts @@ -80,8 +80,8 @@ export class QuickAccess { } } - async openFile(fileName: string): Promise { - await this.openQuickAccessAndWait(fileName, true); + async openFile(fileName: string, fileSearch = fileName): Promise { + await this.openQuickAccessAndWait(fileSearch, true); await this.code.dispatchKeybinding('enter'); await this.editors.waitForActiveTab(fileName); diff --git a/test/smoke/src/areas/workbench/data-migration.test.ts b/test/smoke/src/areas/workbench/data-migration.test.ts index def6cc5820b..a14bb1da5c8 100644 --- a/test/smoke/src/areas/workbench/data-migration.test.ts +++ b/test/smoke/src/areas/workbench/data-migration.test.ts @@ -56,11 +56,11 @@ export function setup(opts: ParsedArgs, testDataPath: string) { await app.restart(); await app.workbench.editors.waitForTab(readmeMd, true); - await app.workbench.editors.selectTab(readmeMd); + await app.workbench.quickaccess.openFile(readmeMd); await app.workbench.editor.waitForEditorContents(readmeMd, c => c.indexOf(textToType) > -1); await app.workbench.editors.waitForTab(untitled, true); - await app.workbench.editors.selectTab(untitled); + await app.workbench.quickaccess.openFile(untitled, textToTypeInUntitled); await app.workbench.editor.waitForEditorContents(untitled, c => c.indexOf(textToTypeInUntitled) > -1); await app.stop(); @@ -162,11 +162,11 @@ export function setup(opts: ParsedArgs, testDataPath: string) { await insidersApp.start(); await insidersApp.workbench.editors.waitForTab(readmeMd, true); - await insidersApp.workbench.editors.selectTab(readmeMd); + await insidersApp.workbench.quickaccess.openFile(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.quickaccess.openFile(textToTypeInUntitled); await insidersApp.workbench.editor.waitForEditorContents(untitled, c => c.indexOf(textToTypeInUntitled) > -1); await insidersApp.stop();