From 85d2077f1924625bd2a89aa3ef5af26108c4c27d Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Thu, 26 Mar 2020 12:28:44 +0100 Subject: [PATCH] smoke - quickopen => quickaccess --- test/automation/src/index.ts | 2 +- .../src/{quickopen.ts => quickaccess.ts} | 10 +++++----- test/automation/src/settings.ts | 6 +++--- test/automation/src/terminal.ts | 6 +++--- test/automation/src/workbench.ts | 14 +++++++------- test/smoke/src/areas/editor/editor.test.ts | 6 +++--- test/smoke/src/areas/extensions/extensions.test.ts | 2 +- test/smoke/src/areas/languages/languages.test.ts | 8 ++++---- test/smoke/src/areas/multiroot/multiroot.test.ts | 2 +- .../src/areas/preferences/preferences.test.ts | 2 +- test/smoke/src/areas/search/search.test.ts | 4 ++-- test/smoke/src/areas/statusbar/statusbar.test.ts | 8 ++++---- test/smoke/src/areas/workbench/data-loss.test.ts | 2 +- .../src/areas/workbench/data-migration.test.ts | 10 +++++----- 14 files changed, 41 insertions(+), 41 deletions(-) rename test/automation/src/{quickopen.ts => quickaccess.ts} (90%) diff --git a/test/automation/src/index.ts b/test/automation/src/index.ts index f8301728be8..1eb4c8005e3 100644 --- a/test/automation/src/index.ts +++ b/test/automation/src/index.ts @@ -16,7 +16,7 @@ export * from './logger'; export * from './peek'; export * from './problems'; export * from './quickinput'; -export * from './quickopen'; +export * from './quickaccess'; export * from './scm'; export * from './search'; export * from './settings'; diff --git a/test/automation/src/quickopen.ts b/test/automation/src/quickaccess.ts similarity index 90% rename from test/automation/src/quickopen.ts rename to test/automation/src/quickaccess.ts index cd07572b42a..918d213050b 100644 --- a/test/automation/src/quickopen.ts +++ b/test/automation/src/quickaccess.ts @@ -7,14 +7,14 @@ import { Editors } from './editors'; import { Code } from './code'; import { QuickInput } from './quickinput'; -export class QuickOpen { +export class QuickAccess { constructor(private code: Code, private editors: Editors, private quickInput: QuickInput) { } - async openQuickOpen(value: string): Promise { + async openQuickAccess(value: string): Promise { let retries = 0; - // other parts of code might steal focus away from quickopen :( + // other parts of code might steal focus away from quickinput :( while (retries < 5) { if (process.platform === 'darwin') { await this.code.dispatchKeybinding('cmd+p'); @@ -40,7 +40,7 @@ export class QuickOpen { } async openFile(fileName: string): Promise { - await this.openQuickOpen(fileName); + await this.openQuickAccess(fileName); await this.quickInput.waitForQuickInputElements(names => names[0] === fileName); await this.code.dispatchKeybinding('enter'); @@ -49,7 +49,7 @@ export class QuickOpen { } async runCommand(commandId: string): Promise { - await this.openQuickOpen(`>${commandId}`); + await this.openQuickAccess(`>${commandId}`); // wait for best choice to be focused await this.code.waitForTextContent(QuickInput.QUICK_INPUT_FOCUSED_ELEMENT); diff --git a/test/automation/src/settings.ts b/test/automation/src/settings.ts index de54d4fc6d8..87366ed5e03 100644 --- a/test/automation/src/settings.ts +++ b/test/automation/src/settings.ts @@ -8,11 +8,11 @@ import * as path from 'path'; import { Editor } from './editor'; import { Editors } from './editors'; import { Code } from './code'; -import { QuickOpen } from './quickopen'; +import { QuickAccess } from './quickaccess'; export class SettingsEditor { - constructor(private code: Code, private userDataPath: string, private editors: Editors, private editor: Editor, private quickopen: QuickOpen) { } + constructor(private code: Code, private userDataPath: string, private editors: Editors, private editor: Editor, private quickaccess: QuickAccess) { } async addUserSetting(setting: string, value: string): Promise { await this.openSettings(); @@ -32,6 +32,6 @@ export class SettingsEditor { } private async openSettings(): Promise { - await this.quickopen.runCommand('workbench.action.openSettingsJson'); + await this.quickaccess.runCommand('workbench.action.openSettingsJson'); } } diff --git a/test/automation/src/terminal.ts b/test/automation/src/terminal.ts index 0aa4ee46a75..207f8c90b16 100644 --- a/test/automation/src/terminal.ts +++ b/test/automation/src/terminal.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ import { Code } from './code'; -import { QuickOpen } from './quickopen'; +import { QuickAccess } from './quickaccess'; const PANEL_SELECTOR = 'div[id="workbench.panel.terminal"]'; const XTERM_SELECTOR = `${PANEL_SELECTOR} .terminal-wrapper`; @@ -12,10 +12,10 @@ const XTERM_TEXTAREA = `${XTERM_SELECTOR} textarea.xterm-helper-textarea`; export class Terminal { - constructor(private code: Code, private quickopen: QuickOpen) { } + constructor(private code: Code, private quickaccess: QuickAccess) { } async showTerminal(): Promise { - await this.quickopen.runCommand('workbench.action.terminal.toggleTerminal'); + await this.quickaccess.runCommand('workbench.action.terminal.toggleTerminal'); await this.code.waitForActiveElement(XTERM_TEXTAREA); await this.code.waitForTerminalBuffer(XTERM_SELECTOR, lines => lines.some(line => line.length > 0)); } diff --git a/test/automation/src/workbench.ts b/test/automation/src/workbench.ts index 51606062d91..e2373948924 100644 --- a/test/automation/src/workbench.ts +++ b/test/automation/src/workbench.ts @@ -5,7 +5,7 @@ import { Explorer } from './explorer'; import { ActivityBar } from './activityBar'; -import { QuickOpen } from './quickopen'; +import { QuickAccess } from './quickaccess'; import { QuickInput } from './quickinput'; import { Extensions } from './extensions'; import { Search } from './search'; @@ -26,7 +26,7 @@ export interface Commands { export class Workbench { - readonly quickopen: QuickOpen; + readonly quickaccess: QuickAccess; readonly quickinput: QuickInput; readonly editors: Editors; readonly explorer: Explorer; @@ -45,18 +45,18 @@ export class Workbench { constructor(code: Code, userDataPath: string) { this.editors = new Editors(code); this.quickinput = new QuickInput(code); - this.quickopen = new QuickOpen(code, this.editors, this.quickinput); + this.quickaccess = new QuickAccess(code, this.editors, this.quickinput); this.explorer = new Explorer(code, this.editors); this.activitybar = new ActivityBar(code); this.search = new Search(code); this.extensions = new Extensions(code); - this.editor = new Editor(code, this.quickopen); + this.editor = new Editor(code, this.quickaccess); this.scm = new SCM(code); - this.debug = new Debug(code, this.quickopen, this.editors, this.editor); + this.debug = new Debug(code, this.quickaccess, this.editors, this.editor); this.statusbar = new StatusBar(code); this.problems = new Problems(code); - this.settingsEditor = new SettingsEditor(code, userDataPath, this.editors, this.editor, this.quickopen); + this.settingsEditor = new SettingsEditor(code, userDataPath, this.editors, this.editor, this.quickaccess); this.keybindingsEditor = new KeybindingsEditor(code); - this.terminal = new Terminal(code, this.quickopen); + this.terminal = new Terminal(code, this.quickaccess); } } diff --git a/test/smoke/src/areas/editor/editor.test.ts b/test/smoke/src/areas/editor/editor.test.ts index 2b5f58bf644..111569e8fac 100644 --- a/test/smoke/src/areas/editor/editor.test.ts +++ b/test/smoke/src/areas/editor/editor.test.ts @@ -9,14 +9,14 @@ export function setup() { describe('Editor', () => { it('shows correct quick outline', async function () { const app = this.app as Application; - await app.workbench.quickopen.openFile('www'); + await app.workbench.quickaccess.openFile('www'); - await app.workbench.quickopen.openQuickOutline(); + await app.workbench.quickaccess.openQuickOutline(); await app.workbench.quickinput.waitForQuickInputElements(names => names.length >= 6); }); // it('folds/unfolds the code correctly', async function () { - // await app.workbench.quickopen.openFile('www'); + // await app.workbench.quickaccess.openFile('www'); // // Fold // await app.workbench.editor.foldAtLine(3); diff --git a/test/smoke/src/areas/extensions/extensions.test.ts b/test/smoke/src/areas/extensions/extensions.test.ts index bf43a5013fd..5d729a2c2cf 100644 --- a/test/smoke/src/areas/extensions/extensions.test.ts +++ b/test/smoke/src/areas/extensions/extensions.test.ts @@ -24,7 +24,7 @@ export function setup() { if (app.remote) { await app.reload(); } - await app.workbench.quickopen.runCommand('Smoke Test Check'); + await app.workbench.quickaccess.runCommand('Smoke Test Check'); await app.workbench.statusbar.waitForStatusbarText('smoke test', 'VS Code Smoke Test Check'); }); }); diff --git a/test/smoke/src/areas/languages/languages.test.ts b/test/smoke/src/areas/languages/languages.test.ts index 36c9bf446dc..6d7a7d1f039 100644 --- a/test/smoke/src/areas/languages/languages.test.ts +++ b/test/smoke/src/areas/languages/languages.test.ts @@ -9,15 +9,15 @@ export function setup() { describe('Language Features', () => { it('verifies quick outline', async function () { const app = this.app as Application; - await app.workbench.quickopen.openFile('style.css'); + await app.workbench.quickaccess.openFile('style.css'); - await app.workbench.quickopen.openQuickOutline(); + await app.workbench.quickaccess.openQuickOutline(); await app.workbench.quickinput.waitForQuickInputElements(names => names.length === 2); }); it('verifies problems view', async function () { const app = this.app as Application; - await app.workbench.quickopen.openFile('style.css'); + await app.workbench.quickaccess.openFile('style.css'); await app.workbench.editor.waitForTypeInEditor('style.css', '.foo{}'); await app.code.waitForElement(Problems.getSelectorInEditor(ProblemSeverity.WARNING)); @@ -30,7 +30,7 @@ export function setup() { it('verifies settings', async function () { const app = this.app as Application; await app.workbench.settingsEditor.addUserSetting('css.lint.emptyRules', '"error"'); - await app.workbench.quickopen.openFile('style.css'); + await app.workbench.quickaccess.openFile('style.css'); await app.code.waitForElement(Problems.getSelectorInEditor(ProblemSeverity.ERROR)); diff --git a/test/smoke/src/areas/multiroot/multiroot.test.ts b/test/smoke/src/areas/multiroot/multiroot.test.ts index 022634a8be5..604d0f5a2df 100644 --- a/test/smoke/src/areas/multiroot/multiroot.test.ts +++ b/test/smoke/src/areas/multiroot/multiroot.test.ts @@ -45,7 +45,7 @@ export function setup() { it('shows results from all folders', async function () { const app = this.app as Application; - await app.workbench.quickopen.openQuickOpen('*.*'); + await app.workbench.quickaccess.openQuickAccess('*.*'); await app.workbench.quickinput.waitForQuickInputElements(names => names.length === 6); await app.workbench.quickinput.closeQuickInput(); diff --git a/test/smoke/src/areas/preferences/preferences.test.ts b/test/smoke/src/areas/preferences/preferences.test.ts index 721f46a7de6..d892273e043 100644 --- a/test/smoke/src/areas/preferences/preferences.test.ts +++ b/test/smoke/src/areas/preferences/preferences.test.ts @@ -10,7 +10,7 @@ export function setup() { it('turns off editor line numbers and verifies the live change', async function () { const app = this.app as Application; - await app.workbench.quickopen.openFile('app.js'); + await app.workbench.quickaccess.openFile('app.js'); await app.code.waitForElements('.line-numbers', false, elements => !!elements.length); await app.workbench.settingsEditor.addUserSetting('editor.lineNumbers', '"off"'); diff --git a/test/smoke/src/areas/search/search.test.ts b/test/smoke/src/areas/search/search.test.ts index bdd9ecc39af..eeb00618348 100644 --- a/test/smoke/src/areas/search/search.test.ts +++ b/test/smoke/src/areas/search/search.test.ts @@ -70,7 +70,7 @@ export function setup() { 'jsconfig.json' ]; - await app.workbench.quickopen.openQuickOpen('.js'); + await app.workbench.quickaccess.openQuickAccess('.js'); await app.workbench.quickinput.waitForQuickInputElements(names => expectedNames.every(n => names.some(m => n === m))); await app.code.dispatchKeybinding('escape'); }); @@ -83,7 +83,7 @@ export function setup() { 'package.json' ]; - await app.workbench.quickopen.openQuickOpen('a.s'); + await app.workbench.quickaccess.openQuickAccess('a.s'); await app.workbench.quickinput.waitForQuickInputElements(names => expectedNames.every(n => names.some(m => n === m))); await app.code.dispatchKeybinding('escape'); }); diff --git a/test/smoke/src/areas/statusbar/statusbar.test.ts b/test/smoke/src/areas/statusbar/statusbar.test.ts index 5c5a3700bfb..f90497b0e08 100644 --- a/test/smoke/src/areas/statusbar/statusbar.test.ts +++ b/test/smoke/src/areas/statusbar/statusbar.test.ts @@ -17,7 +17,7 @@ export function setup(isWeb) { await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.SYNC_STATUS); await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.PROBLEMS_STATUS); - await app.workbench.quickopen.openFile('app.js'); + await app.workbench.quickaccess.openFile('app.js'); if (!isWeb) { // Encoding picker currently hidden in web (only UTF-8 supported) await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.ENCODING_STATUS); @@ -35,7 +35,7 @@ export function setup(isWeb) { await app.workbench.quickinput.waitForQuickInputOpened(); await app.workbench.quickinput.closeQuickInput(); - await app.workbench.quickopen.openFile('app.js'); + await app.workbench.quickaccess.openFile('app.js'); await app.workbench.statusbar.clickOn(StatusBarElement.INDENTATION_STATUS); await app.workbench.quickinput.waitForQuickInputOpened(); await app.workbench.quickinput.closeQuickInput(); @@ -74,7 +74,7 @@ export function setup(isWeb) { it(`checks if 'Go to Line' works if called from the status bar`, async function () { const app = this.app as Application; - await app.workbench.quickopen.openFile('app.js'); + await app.workbench.quickaccess.openFile('app.js'); await app.workbench.statusbar.clickOn(StatusBarElement.SELECTION_STATUS); await app.workbench.quickinput.waitForQuickInputOpened(); @@ -86,7 +86,7 @@ export function setup(isWeb) { it(`verifies if changing EOL is reflected in the status bar`, async function () { const app = this.app as Application; - await app.workbench.quickopen.openFile('app.js'); + await app.workbench.quickaccess.openFile('app.js'); await app.workbench.statusbar.clickOn(StatusBarElement.EOL_STATUS); await app.workbench.quickinput.waitForQuickInputOpened(); diff --git a/test/smoke/src/areas/workbench/data-loss.test.ts b/test/smoke/src/areas/workbench/data-loss.test.ts index 07ca7f83886..d225304b569 100644 --- a/test/smoke/src/areas/workbench/data-loss.test.ts +++ b/test/smoke/src/areas/workbench/data-loss.test.ts @@ -17,7 +17,7 @@ export function setup() { const readmeMd = 'readme.md'; const textToType = 'Hello, Code'; - await app.workbench.quickopen.openFile(readmeMd); + await app.workbench.quickaccess.openFile(readmeMd); await app.workbench.editor.waitForTypeInEditor(readmeMd, textToType); await app.reload(); diff --git a/test/smoke/src/areas/workbench/data-migration.test.ts b/test/smoke/src/areas/workbench/data-migration.test.ts index 659fd62952a..75bd46fee46 100644 --- a/test/smoke/src/areas/workbench/data-migration.test.ts +++ b/test/smoke/src/areas/workbench/data-migration.test.ts @@ -24,11 +24,11 @@ export function setup(stableCodePath: string, testDataPath: string) { await stableApp!.start(); // Open 3 editors and pin 2 of them - await stableApp.workbench.quickopen.openFile('www'); - await stableApp.workbench.quickopen.runCommand('View: Keep Editor'); + await stableApp.workbench.quickaccess.openFile('www'); + await stableApp.workbench.quickaccess.runCommand('View: Keep Editor'); - await stableApp.workbench.quickopen.openFile('app.js'); - await stableApp.workbench.quickopen.runCommand('View: Keep Editor'); + await stableApp.workbench.quickaccess.openFile('app.js'); + await stableApp.workbench.quickaccess.runCommand('View: Keep Editor'); await stableApp.workbench.editors.newUntitledFile(); @@ -70,7 +70,7 @@ export function setup(stableCodePath: string, testDataPath: string) { const readmeMd = 'readme.md'; const textToType = 'Hello, Code'; - await stableApp.workbench.quickopen.openFile(readmeMd); + await stableApp.workbench.quickaccess.openFile(readmeMd); await stableApp.workbench.editor.waitForTypeInEditor(readmeMd, textToType); await stableApp.stop();