mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-22 04:40:30 -04:00
VS Code merge to df8fe74bd55313de0dd2303bc47a4aab0ca56b0e (#17979)
* Merge from vscode 504f934659740e9d41501cad9f162b54d7745ad9 * delete unused folders * distro * Bump build node version * update chokidar * FIx hygiene errors * distro * Fix extension lint issues * Remove strict-vscode * Add copyright header exemptions * Bump vscode-extension-telemetry to fix webpacking issue with zone.js * distro * Fix failing tests (revert marked.js back to current one until we decide to update) * Skip searchmodel test * Fix mac build * temp debug script loading * Try disabling coverage * log error too * Revert "log error too" This reverts commit af0183e5d4ab458fdf44b88fbfab9908d090526f. * Revert "temp debug script loading" This reverts commit 3d687d541c76db2c5b55626c78ae448d3c25089c. * Add comments explaining coverage disabling * Fix ansi_up loading issue * Merge latest from ads * Use newer option * Fix compile * add debug logging warn * Always log stack * log more * undo debug * Update to use correct base path (+cleanup) * distro * fix compile errors * Remove strict-vscode * Fix sql editors not showing * Show db dropdown input & fix styling * Fix more info in gallery * Fix gallery asset requests * Delete unused workflow * Fix tapable resolutions for smoke test compile error * Fix smoke compile * Disable crash reporting * Disable interactive Co-authored-by: ADS Merger <karlb@microsoft.com>
This commit is contained in:
@@ -3,10 +3,15 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import minimist = require('minimist');
|
||||
import { Application } from '../../../../automation';
|
||||
import { afterSuite, beforeSuite } from '../../utils';
|
||||
|
||||
export function setup() {
|
||||
export function setup(opts: minimist.ParsedArgs) {
|
||||
describe('Editor', () => {
|
||||
beforeSuite(opts);
|
||||
afterSuite(opts);
|
||||
|
||||
it('shows correct quick outline', async function () {
|
||||
const app = this.app as Application;
|
||||
await app.workbench.quickaccess.openFile('www');
|
||||
@@ -14,21 +19,5 @@ export function setup() {
|
||||
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.quickaccess.openFile('www');
|
||||
|
||||
// // Fold
|
||||
// await app.workbench.editor.foldAtLine(3);
|
||||
// await app.workbench.editor.waitUntilShown(3);
|
||||
// await app.workbench.editor.waitUntilHidden(4);
|
||||
// await app.workbench.editor.waitUntilHidden(5);
|
||||
|
||||
// // Unfold
|
||||
// await app.workbench.editor.unfoldAtLine(3);
|
||||
// await app.workbench.editor.waitUntilShown(3);
|
||||
// await app.workbench.editor.waitUntilShown(4);
|
||||
// await app.workbench.editor.waitUntilShown(5);
|
||||
// });
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3,10 +3,15 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import minimist = require('minimist');
|
||||
import { Application, Quality } from '../../../../automation';
|
||||
import { afterSuite, beforeSuite } from '../../utils';
|
||||
|
||||
export function setup() {
|
||||
export function setup(opts: minimist.ParsedArgs) {
|
||||
describe('Extensions', () => {
|
||||
beforeSuite(opts);
|
||||
afterSuite(opts);
|
||||
|
||||
it(`install and enable vscode-smoketest-check extension`, async function () {
|
||||
const app = this.app as Application;
|
||||
|
||||
@@ -16,7 +21,7 @@ export function setup() {
|
||||
|
||||
await app.workbench.extensions.openExtensionsViewlet();
|
||||
|
||||
await app.workbench.extensions.installExtension('michelkaporin.vscode-smoketest-check', true);
|
||||
await app.workbench.extensions.installExtension('ms-vscode.vscode-smoketest-check', true);
|
||||
|
||||
// Close extension editor because keybindings dispatch is not working when web views are opened and focused
|
||||
// https://github.com/microsoft/vscode/issues/110276
|
||||
|
||||
@@ -3,10 +3,15 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import minimist = require('minimist');
|
||||
import { Application, ProblemSeverity, Problems } from '../../../../automation/out';
|
||||
import { afterSuite, beforeSuite } from '../../utils';
|
||||
|
||||
export function setup() {
|
||||
export function setup(opts: minimist.ParsedArgs) {
|
||||
describe('Language Features', () => {
|
||||
beforeSuite(opts);
|
||||
afterSuite(opts);
|
||||
|
||||
it('verifies quick outline', async function () {
|
||||
const app = this.app as Application;
|
||||
await app.workbench.quickaccess.openFile('style.css');
|
||||
|
||||
@@ -4,8 +4,10 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as fs from 'fs';
|
||||
import minimist = require('minimist');
|
||||
import * as path from 'path';
|
||||
import { Application } from '../../../../automation';
|
||||
import { afterSuite, beforeSuite } from '../../utils';
|
||||
|
||||
function toUri(path: string): string {
|
||||
if (process.platform === 'win32') {
|
||||
@@ -34,19 +36,15 @@ async function createWorkspaceFile(workspacePath: string): Promise<string> {
|
||||
return workspaceFilePath;
|
||||
}
|
||||
|
||||
export function setup() {
|
||||
export function setup(opts: minimist.ParsedArgs) {
|
||||
describe('Multiroot', () => {
|
||||
|
||||
before(async function () {
|
||||
const app = this.app as Application;
|
||||
|
||||
const workspaceFilePath = await createWorkspaceFile(app.workspacePathOrFolder);
|
||||
|
||||
// restart with preventing additional windows from restoring
|
||||
// to ensure the window after restart is the multi-root workspace
|
||||
await app.restart({ workspaceOrFolder: workspaceFilePath });
|
||||
beforeSuite(opts, async opts => {
|
||||
const workspacePath = await createWorkspaceFile(opts.workspacePath);
|
||||
return { ...opts, workspacePath };
|
||||
});
|
||||
|
||||
afterSuite(opts);
|
||||
|
||||
it('shows results from all folders', async function () {
|
||||
const app = this.app as Application;
|
||||
await app.workbench.quickaccess.openQuickAccess('*.*');
|
||||
|
||||
@@ -4,20 +4,13 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as cp from 'child_process';
|
||||
import minimist = require('minimist');
|
||||
import { Application } from '../../../../automation';
|
||||
import { afterSuite, beforeSuite } from '../../utils';
|
||||
|
||||
// function wait(ms: number): Promise<void> {
|
||||
// return new Promise(r => setTimeout(r, ms));
|
||||
// }
|
||||
|
||||
|
||||
export function setup() {
|
||||
describe('Notebooks', () => {
|
||||
after(async function () {
|
||||
const app = this.app as Application;
|
||||
cp.execSync('git checkout . --quiet', { cwd: app.workspacePathOrFolder });
|
||||
cp.execSync('git reset --hard HEAD --quiet', { cwd: app.workspacePathOrFolder });
|
||||
});
|
||||
export function setup(opts: minimist.ParsedArgs) {
|
||||
describe.skip('Notebooks', () => {
|
||||
beforeSuite(opts);
|
||||
|
||||
afterEach(async function () {
|
||||
const app = this.app as Application;
|
||||
@@ -25,34 +18,42 @@ export function setup() {
|
||||
await app.workbench.quickaccess.runCommand('workbench.action.closeActiveEditor');
|
||||
});
|
||||
|
||||
// it('inserts/edits code cell', async function () {
|
||||
// const app = this.app as Application;
|
||||
// await app.workbench.notebook.openNotebook();
|
||||
// await app.workbench.notebook.focusNextCell();
|
||||
// await app.workbench.notebook.insertNotebookCell('code');
|
||||
// await app.workbench.notebook.waitForTypeInEditor('// some code');
|
||||
// await app.workbench.notebook.stopEditingCell();
|
||||
// });
|
||||
after(async function () {
|
||||
const app = this.app as Application;
|
||||
cp.execSync('git checkout . --quiet', { cwd: app.workspacePathOrFolder });
|
||||
cp.execSync('git reset --hard HEAD --quiet', { cwd: app.workspacePathOrFolder });
|
||||
});
|
||||
|
||||
// it('inserts/edits markdown cell', async function () {
|
||||
// const app = this.app as Application;
|
||||
// await app.workbench.notebook.openNotebook();
|
||||
// await app.workbench.notebook.focusNextCell();
|
||||
// await app.workbench.notebook.insertNotebookCell('markdown');
|
||||
// await app.workbench.notebook.waitForTypeInEditor('## hello2! ');
|
||||
// await app.workbench.notebook.stopEditingCell();
|
||||
// await app.workbench.notebook.waitForMarkdownContents('h2', 'hello2!');
|
||||
// });
|
||||
afterSuite(opts);
|
||||
|
||||
// it('moves focus as it inserts/deletes a cell', async function () {
|
||||
// const app = this.app as Application;
|
||||
// await app.workbench.notebook.openNotebook();
|
||||
// await app.workbench.notebook.insertNotebookCell('code');
|
||||
// await app.workbench.notebook.waitForActiveCellEditorContents('');
|
||||
// await app.workbench.notebook.stopEditingCell();
|
||||
// await app.workbench.notebook.deleteActiveCell();
|
||||
// await app.workbench.notebook.waitForMarkdownContents('p', 'Markdown Cell');
|
||||
// });
|
||||
it.skip('inserts/edits code cell', async function () {
|
||||
const app = this.app as Application;
|
||||
await app.workbench.notebook.openNotebook();
|
||||
await app.workbench.notebook.focusNextCell();
|
||||
await app.workbench.notebook.insertNotebookCell('code');
|
||||
await app.workbench.notebook.waitForTypeInEditor('// some code');
|
||||
await app.workbench.notebook.stopEditingCell();
|
||||
});
|
||||
|
||||
it.skip('inserts/edits markdown cell', async function () {
|
||||
const app = this.app as Application;
|
||||
await app.workbench.notebook.openNotebook();
|
||||
await app.workbench.notebook.focusNextCell();
|
||||
await app.workbench.notebook.insertNotebookCell('markdown');
|
||||
await app.workbench.notebook.waitForTypeInEditor('## hello2! ');
|
||||
await app.workbench.notebook.stopEditingCell();
|
||||
await app.workbench.notebook.waitForMarkdownContents('h2', 'hello2!');
|
||||
});
|
||||
|
||||
it.skip('moves focus as it inserts/deletes a cell', async function () {
|
||||
const app = this.app as Application;
|
||||
await app.workbench.notebook.openNotebook();
|
||||
await app.workbench.notebook.insertNotebookCell('code');
|
||||
await app.workbench.notebook.waitForActiveCellEditorContents('');
|
||||
await app.workbench.notebook.stopEditingCell();
|
||||
await app.workbench.notebook.deleteActiveCell();
|
||||
await app.workbench.notebook.waitForMarkdownContents('p', 'Markdown Cell');
|
||||
});
|
||||
|
||||
it.skip('moves focus in and out of output', async function () { // TODO@rebornix https://github.com/microsoft/vscode/issues/113882
|
||||
const app = this.app as Application;
|
||||
|
||||
@@ -3,10 +3,15 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import minimist = require('minimist');
|
||||
import { Application, ActivityBarPosition } from '../../../../automation';
|
||||
import { afterSuite, beforeSuite } from '../../utils';
|
||||
|
||||
export function setup() {
|
||||
export function setup(opts: minimist.ParsedArgs) {
|
||||
describe('Preferences', () => {
|
||||
beforeSuite(opts);
|
||||
afterSuite(opts);
|
||||
|
||||
it('turns off editor line numbers and verifies the live change', async function () {
|
||||
const app = this.app as Application;
|
||||
|
||||
@@ -27,13 +32,5 @@ export function setup() {
|
||||
await app.code.dispatchKeybinding('ctrl+u');
|
||||
await app.workbench.activitybar.waitForActivityBar(ActivityBarPosition.RIGHT);
|
||||
});
|
||||
|
||||
after(async function () {
|
||||
const app = this.app as Application;
|
||||
await app.workbench.settingsEditor.clearUserSettings();
|
||||
|
||||
// Wait for settings to be applied, which will happen after the settings file is empty
|
||||
await app.workbench.activitybar.waitForActivityBar(ActivityBarPosition.LEFT);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -4,17 +4,23 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as cp from 'child_process';
|
||||
import minimist = require('minimist');
|
||||
import { Application } from '../../../../automation';
|
||||
import { afterSuite, beforeSuite } from '../../utils';
|
||||
|
||||
export function setup() {
|
||||
export function setup(opts: minimist.ParsedArgs) {
|
||||
// https://github.com/microsoft/vscode/issues/115244
|
||||
describe('Search', () => {
|
||||
beforeSuite(opts);
|
||||
|
||||
after(function () {
|
||||
const app = this.app as Application;
|
||||
cp.execSync('git checkout . --quiet', { cwd: app.workspacePathOrFolder });
|
||||
cp.execSync('git reset --hard HEAD --quiet', { cwd: app.workspacePathOrFolder });
|
||||
});
|
||||
|
||||
afterSuite(opts);
|
||||
|
||||
// https://github.com/microsoft/vscode/issues/124146
|
||||
it.skip /* https://github.com/microsoft/vscode/issues/124335 */('has a tooltp with a keybinding', async function () {
|
||||
const app = this.app as Application;
|
||||
@@ -68,6 +74,9 @@ export function setup() {
|
||||
});
|
||||
|
||||
describe('Quick Access', () => {
|
||||
beforeSuite(opts);
|
||||
afterSuite(opts);
|
||||
|
||||
it('quick access search produces correct result', async function () {
|
||||
const app = this.app as Application;
|
||||
const expectedNames = [
|
||||
|
||||
@@ -3,10 +3,15 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import minimist = require('minimist');
|
||||
import { Application, Quality, StatusBarElement } from '../../../../automation';
|
||||
import { afterSuite, beforeSuite } from '../../utils';
|
||||
|
||||
export function setup(isWeb) {
|
||||
export function setup(opts: minimist.ParsedArgs) {
|
||||
describe('Statusbar', () => {
|
||||
beforeSuite(opts);
|
||||
afterSuite(opts);
|
||||
|
||||
it('verifies presence of all default status bar elements', async function () {
|
||||
const app = this.app as Application;
|
||||
|
||||
@@ -18,7 +23,7 @@ export function setup(isWeb) {
|
||||
await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.PROBLEMS_STATUS);
|
||||
|
||||
await app.workbench.quickaccess.openFile('app.js');
|
||||
if (!isWeb) {
|
||||
if (!opts.web) {
|
||||
// Encoding picker currently hidden in web (only UTF-8 supported)
|
||||
await app.workbench.statusbar.waitForStatusbarElement(StatusBarElement.ENCODING_STATUS);
|
||||
}
|
||||
@@ -39,7 +44,7 @@ export function setup(isWeb) {
|
||||
await app.workbench.statusbar.clickOn(StatusBarElement.INDENTATION_STATUS);
|
||||
await app.workbench.quickinput.waitForQuickInputOpened();
|
||||
await app.workbench.quickinput.closeQuickInput();
|
||||
if (!isWeb) {
|
||||
if (!opts.web) {
|
||||
// Encoding picker currently hidden in web (only UTF-8 supported)
|
||||
await app.workbench.statusbar.clickOn(StatusBarElement.ENCODING_STATUS);
|
||||
await app.workbench.quickinput.waitForQuickInputOpened();
|
||||
@@ -60,17 +65,6 @@ export function setup(isWeb) {
|
||||
await app.workbench.problems.waitForProblemsView();
|
||||
});
|
||||
|
||||
it(`verifies that 'Tweet us feedback' pop-up appears when clicking on 'Feedback' icon`, async function () {
|
||||
const app = this.app as Application;
|
||||
|
||||
if (app.quality === Quality.Dev) {
|
||||
return this.skip();
|
||||
}
|
||||
|
||||
await app.workbench.statusbar.clickOn(StatusBarElement.FEEDBACK_ICON);
|
||||
await app.code.waitForElement('.feedback-form');
|
||||
});
|
||||
|
||||
it(`checks if 'Go to Line' works if called from the status bar`, async function () {
|
||||
const app = this.app as Application;
|
||||
|
||||
@@ -94,5 +88,16 @@ export function setup(isWeb) {
|
||||
|
||||
await app.workbench.statusbar.waitForEOL('CRLF');
|
||||
});
|
||||
|
||||
it(`verifies that 'Tweet us feedback' pop-up appears when clicking on 'Feedback' icon`, async function () {
|
||||
const app = this.app as Application;
|
||||
|
||||
if (app.quality === Quality.Dev) {
|
||||
return this.skip();
|
||||
}
|
||||
|
||||
await app.workbench.statusbar.clickOn(StatusBarElement.FEEDBACK_ICON);
|
||||
await app.code.waitForElement('.feedback-form');
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3,10 +3,16 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import minimist = require('minimist');
|
||||
import { Application } from '../../../../automation';
|
||||
import { afterSuite, beforeSuite } from '../../utils';
|
||||
|
||||
export function setup(opts: minimist.ParsedArgs) {
|
||||
|
||||
export function setup() {
|
||||
describe('Dataloss', () => {
|
||||
beforeSuite(opts);
|
||||
afterSuite(opts);
|
||||
|
||||
it(`verifies that 'hot exit' works for dirty files`, async function () {
|
||||
const app = this.app as Application;
|
||||
await app.workbench.editors.newUntitledFile();
|
||||
|
||||
@@ -5,15 +5,25 @@
|
||||
|
||||
import { Application, ApplicationOptions, Quality } from '../../../../automation';
|
||||
import { join } from 'path';
|
||||
import { ParsedArgs } from 'minimist';
|
||||
import { timeout } from '../../utils';
|
||||
|
||||
export function setup(stableCodePath: string, testDataPath: string) {
|
||||
export function setup(opts: ParsedArgs, testDataPath: string) {
|
||||
|
||||
describe('Datamigration', () => {
|
||||
it(`verifies opened editors are restored`, async function () {
|
||||
const stableCodePath = opts['stable-build'];
|
||||
if (!stableCodePath) {
|
||||
this.skip();
|
||||
}
|
||||
|
||||
// On macOS, the stable app fails to launch on first try,
|
||||
// so let's retry this once
|
||||
// https://github.com/microsoft/vscode/pull/127799
|
||||
if (process.platform === 'darwin') {
|
||||
this.retries(2);
|
||||
}
|
||||
|
||||
const userDataDir = join(testDataPath, 'd2'); // different data dir from the other tests
|
||||
|
||||
const stableOptions: ApplicationOptions = Object.assign({}, this.defaultOptions);
|
||||
@@ -22,7 +32,7 @@ export function setup(stableCodePath: string, 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');
|
||||
@@ -39,10 +49,10 @@ export function setup(stableCodePath: string, 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');
|
||||
|
||||
@@ -50,6 +60,7 @@ export function setup(stableCodePath: string, testDataPath: string) {
|
||||
});
|
||||
|
||||
it(`verifies that 'hot exit' works for dirty files`, async function () {
|
||||
const stableCodePath = opts['stable-build'];
|
||||
if (!stableCodePath) {
|
||||
this.skip();
|
||||
}
|
||||
@@ -62,7 +73,7 @@ export function setup(stableCodePath: string, testDataPath: string) {
|
||||
stableOptions.quality = Quality.Stable;
|
||||
|
||||
const stableApp = new Application(stableOptions);
|
||||
await stableApp!.start();
|
||||
await stableApp.start();
|
||||
|
||||
await stableApp.workbench.editors.newUntitledFile();
|
||||
|
||||
@@ -75,15 +86,18 @@ export function setup(stableCodePath: string, testDataPath: string) {
|
||||
await stableApp.workbench.quickaccess.openFile(readmeMd);
|
||||
await stableApp.workbench.editor.waitForTypeInEditor(readmeMd, textToType);
|
||||
|
||||
await timeout(2000); // give time to store the backup before stopping the app
|
||||
|
||||
await stableApp.stop();
|
||||
|
||||
const insiderOptions: ApplicationOptions = Object.assign({}, this.defaultOptions);
|
||||
insiderOptions.userDataDir = userDataDir;
|
||||
|
||||
const insidersApp = new Application(insiderOptions);
|
||||
await insidersApp!.start(false /* not expecting walkthrough path */);
|
||||
await insidersApp.start();
|
||||
|
||||
await insidersApp.workbench.editors.waitForActiveTab(readmeMd, true);
|
||||
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);
|
||||
|
||||
@@ -3,46 +3,40 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import minimist = require('minimist');
|
||||
import { Application, Quality } from '../../../../automation';
|
||||
import { afterSuite, beforeSuite } from '../../utils';
|
||||
|
||||
export function setup() {
|
||||
export function setup(opts: minimist.ParsedArgs) {
|
||||
describe('Localization', () => {
|
||||
before(async function () {
|
||||
const app = this.app as Application;
|
||||
|
||||
// Don't run the localization tests in dev or remote.
|
||||
if (app.quality === Quality.Dev || app.remote) {
|
||||
return;
|
||||
}
|
||||
|
||||
await app.workbench.extensions.openExtensionsViewlet();
|
||||
await app.workbench.extensions.installExtension('ms-ceintl.vscode-language-pack-de', false);
|
||||
|
||||
await app.restart({ extraArgs: ['--locale=DE'] });
|
||||
});
|
||||
beforeSuite(opts);
|
||||
afterSuite(opts);
|
||||
|
||||
it(`starts with 'DE' locale and verifies title and viewlets text is in German`, async function () {
|
||||
const app = this.app as Application;
|
||||
|
||||
if (app.quality === Quality.Dev || app.remote) {
|
||||
this.skip();
|
||||
return;
|
||||
return this.skip();
|
||||
}
|
||||
|
||||
// await app.workbench.explorer.waitForOpenEditorsViewTitle(title => /geöffnete editoren/i.test(title));
|
||||
await app.workbench.extensions.openExtensionsViewlet();
|
||||
await app.workbench.extensions.installExtension('ms-ceintl.vscode-language-pack-de', false);
|
||||
await app.restart({ extraArgs: ['--locale=DE'] });
|
||||
|
||||
await app.workbench.search.openSearchViewlet();
|
||||
await app.workbench.search.waitForTitle(title => /suchen/i.test(title));
|
||||
const result = await app.workbench.localization.getLocalizedStrings();
|
||||
const localeInfo = await app.workbench.localization.getLocaleInfo();
|
||||
|
||||
// await app.workbench.scm.openSCMViewlet();
|
||||
// await app.workbench.scm.waitForTitle(title => /quellcodeverwaltung/i.test(title));
|
||||
if (localeInfo.locale === undefined || localeInfo.locale.toLowerCase() !== 'de') {
|
||||
throw new Error(`The requested locale for VS Code was not German. The received value is: ${localeInfo.locale === undefined ? 'not set' : localeInfo.locale}`);
|
||||
}
|
||||
|
||||
// See https://github.com/microsoft/vscode/issues/93462
|
||||
// await app.workbench.debug.openDebugViewlet();
|
||||
// await app.workbench.debug.waitForTitle(title => /starten/i.test(title));
|
||||
if (localeInfo.language.toLowerCase() !== 'de') {
|
||||
throw new Error(`The UI language is not German. It is ${localeInfo.language}`);
|
||||
}
|
||||
|
||||
// await app.workbench.extensions.openExtensionsViewlet();
|
||||
// await app.workbench.extensions.waitForTitle(title => /extensions/i.test(title));
|
||||
if (result.open.toLowerCase() !== 'öffnen' || result.close.toLowerCase() !== 'schließen' || result.find.toLowerCase() !== 'finden') {
|
||||
throw new Error(`Received wrong German localized strings: ${JSON.stringify(result, undefined, 0)}`);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user