Merge from vscode bead496a613e475819f89f08e9e882b841bc1fe8 (#14883)

* Merge from vscode bead496a613e475819f89f08e9e882b841bc1fe8

* Bump distro

* Upgrade GCC to 4.9 due to yarn install errors

* Update build image

* Fix bootstrap base url

* Bump distro

* Fix build errors

* Update source map file

* Disable checkbox for blocking migration issues (#15131)

* disable checkbox for blocking issues

* wip

* disable checkbox fixes

* fix strings

* Remove duplicate tsec command

* Default to off for tab color if settings not present

* re-skip failing tests

* Fix mocha error

* Bump sqlite version & fix notebooks search view

* Turn off esbuild warnings

* Update esbuild log level

* Fix overflowactionbar tests

* Fix ts-ignore in dropdown tests

* cleanup/fixes

* Fix hygiene

* Bundle in entire zone.js module

* Remove extra constructor param

* bump distro for web compile break

* bump distro for web compile break v2

* Undo log level change

* New distro

* Fix integration test scripts

* remove the "no yarn.lock changes" workflow

* fix scripts v2

* Update unit test scripts

* Ensure ads-kerberos2 updates in .vscodeignore

* Try fix unit tests

* Upload crash reports

* remove nogpu

* always upload crashes

* Use bash script

* Consolidate data/ext dir names

* Create in tmp directory

Co-authored-by: chlafreniere <hichise@gmail.com>
Co-authored-by: Christopher Suh <chsuh@microsoft.com>
Co-authored-by: chgagnon <chgagnon@microsoft.com>
This commit is contained in:
Karl Burtram
2021-04-27 14:01:59 -07:00
committed by GitHub
parent 7e1c0076ba
commit 867a963882
1817 changed files with 81812 additions and 50843 deletions

View File

@@ -15,17 +15,28 @@ export function setup() {
return;
}
if (!app.web) {
await app.workbench.settingsEditor.addUserSetting('webview.experimental.useIframes', 'true');
}
await app.workbench.extensions.openExtensionsViewlet();
await app.workbench.extensions.installExtension('michelkaporin.vscode-smoketest-check', true);
await app.workbench.extensions.waitForExtensionsViewlet();
if (app.remote) {
await app.reload();
}
await app.workbench.quickaccess.runCommand('Smoke Test Check');
await app.workbench.statusbar.waitForStatusbarText('smoke test', 'VS Code Smoke Test Check');
});
after(async function () {
const app = this.app as Application;
if (app.web) {
return;
}
await app.workbench.settingsEditor.clearUserSettings();
});
});
}

View File

@@ -54,7 +54,7 @@ export function setup() {
await app.workbench.notebook.waitForMarkdownContents('p', 'Markdown Cell');
});
it.skip('moves focus in and out of output', async function () {
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;
await app.workbench.notebook.openNotebook();
await app.workbench.notebook.executeActiveCell();

View File

@@ -22,7 +22,7 @@ export function setup() {
const app = this.app as Application;
await app.workbench.activitybar.waitForActivityBar(ActivityBarPosition.LEFT);
await app.workbench.keybindingsEditor.updateKeybinding('workbench.action.toggleSidebarPosition', 'ctrl+u', 'Control+U');
await app.workbench.keybindingsEditor.updateKeybinding('workbench.action.toggleSidebarPosition', 'View: Toggle Side Bar Position', 'ctrl+u', 'Control+U');
await app.code.dispatchKeybinding('ctrl+u');
await app.workbench.activitybar.waitForActivityBar(ActivityBarPosition.RIGHT);

View File

@@ -34,7 +34,8 @@ export function setup() {
await app.workbench.search.hideQueryDetails();
});
it('dismisses result & checks for correct result number', async function () {
// https://github.com/microsoft/vscode/issues/115244
it.skip('dismisses result & checks for correct result number', async function () {
const app = this.app as Application;
await app.workbench.search.searchFor('body');
await app.workbench.search.removeFileMatch('app.js');
@@ -45,7 +46,6 @@ export function setup() {
const app = this.app as Application;
await app.workbench.search.searchFor('body');
await app.workbench.search.expandReplace();
await app.workbench.search.setReplaceText('ydob');
await app.workbench.search.replaceFileMatch('app.js');
await app.workbench.search.waitForResultText('12 results in 4 files');

View File

@@ -20,8 +20,8 @@ export function setup() {
afterEach(async function () {
if (app) {
if (this.currentTest.state === 'failed') {
const name = this.currentTest.fullTitle().replace(/[^a-z0-9\-]/ig, '_');
if (this.currentTest!.state === 'failed') {
const name = this.currentTest!.fullTitle().replace(/[^a-z0-9\-]/ig, '_');
await app.captureScreenshot(name);
}
}

View File

@@ -28,7 +28,7 @@ export function setup() {
return;
}
await app.workbench.explorer.waitForOpenEditorsViewTitle(title => /geöffnete editoren/i.test(title));
// await app.workbench.explorer.waitForOpenEditorsViewTitle(title => /geöffnete editoren/i.test(title));
await app.workbench.search.openSearchViewlet();
await app.workbench.search.waitForTitle(title => /suchen/i.test(title));

View File

@@ -35,11 +35,6 @@ import { setup as setupDataMultirootTests } from './areas/multiroot/multiroot.te
import { setup as setupDataLocalizationTests } from './areas/workbench/localization.test';
import { setup as setupLaunchTests } from './areas/workbench/launch.test';*/
if (!/^v10/.test(process.version) && !/^v12/.test(process.version)) {
console.error('Error: Smoketest must be run using Node 10/12. Currently running', process.version);
process.exit(1);
}
const tmpDir = tmp.dirSync({ prefix: 't' }) as { name: string; removeCallback: Function; };
const testDataPath = tmpDir.name;
process.once('exit', () => rimraf.sync(testDataPath));
@@ -282,19 +277,39 @@ after(async function () {
if (opts.log) {
const logsDir = path.join(userDataDir, 'logs');
const destLogsDir = path.join(path.dirname(opts.log), 'logs');
await new Promise((c, e) => ncp(logsDir, destLogsDir, err => err ? e(err) : c()));
await new Promise((c, e) => ncp(logsDir, destLogsDir, err => err ? e(err) : c(undefined)));
}
await new Promise((c, e) => rimraf(testDataPath, { maxBusyTries: 10 }, err => err ? e(err) : c()));
await new Promise((c, e) => rimraf(testDataPath, { maxBusyTries: 10 }, err => err ? e(err) : c(undefined)));
});
describe(`VSCode Smoke Tests (${opts.web ? 'Web' : 'Electron'})`, () => {
if (screenshotsPath) {
afterEach(async function () {
if (this.currentTest!.state !== 'failed') {
return;
}
const app = this.app as Application;
const name = this.currentTest!.fullTitle().replace(/[^a-z0-9\-]/ig, '_');
/*if (!opts.web && opts['stable-build']) {
describe(`Stable vs Insiders Smoke Tests: This test MUST run before releasing by providing the --stable-build command line argument`, () => {
setupDataMigrationTests(opts['stable-build'], testDataPath);
await app.captureScreenshot(name);
});
}*/
}
if (opts.log) {
beforeEach(async function () {
const app = this.app as Application;
const title = this.currentTest!.fullTitle();
app.logger.log('*** Test start:', title);
});
}
// if (!opts.web && opts['stable-build']) {
// describe(`Stable vs Insiders Smoke Tests: This test MUST run before releasing by providing the --stable-build command line argument`, () => {
// setupDataMigrationTests(opts['stable-build'], testDataPath);
// });
// }
describe(`VSCode Smoke Tests (${opts.web ? 'Web' : 'Electron'})`, () => {
before(async function () {
@@ -307,36 +322,16 @@ describe(`VSCode Smoke Tests (${opts.web ? 'Web' : 'Electron'})`, () => {
await this.app.stop();
});
if (screenshotsPath) {
afterEach(async function () {
if (this.currentTest.state !== 'failed') {
return;
}
const app = this.app as Application;
const name = this.currentTest.fullTitle().replace(/[^a-z0-9\-]/ig, '_');
await app.captureScreenshot(name);
});
}
if (opts.log) {
beforeEach(async function () {
const app = this.app as Application;
const title = this.currentTest.fullTitle();
app.logger.log('*** Test start:', title);
});
}
sqlMain(opts.web);
/*if (!opts.web) { setupDataLossTests(); }
/* if (!opts.web) { setupDataLossTests(); }
if (!opts.web) { setupDataPreferencesTests(); }
setupDataSearchTests();
setupDataNotebookTests();
setupDataLanguagesTests();
setupDataEditorTests();
setupDataStatusbarTests(!!opts.web);
if (!opts.web) { setupDataExtensionTests(); }
setupDataExtensionTests();
if (!opts.web) { setupDataMultirootTests(); }
if (!opts.web) { setupDataLocalizationTests(); }
if (!opts.web) { setupLaunchTests(); }*/

View File

@@ -31,7 +31,7 @@ const PLATFORM = '${PLATFORM}';
const RUNTIME = '${RUNTIME}';
const VERSION = '${VERSION}';
const sqliteUrl = `https://github.com/Microsoft/azuredatastudio-sqlite/releases/download/1.1.2/azuredatastudio-sqlite-${PLATFORM}-${RUNTIME}-${VERSION}.zip`;
const sqliteUrl = `https://github.com/Microsoft/azuredatastudio-sqlite/releases/download/1.2.1/azuredatastudio-sqlite-${PLATFORM}-${RUNTIME}-${VERSION}.zip`;
export async function setup(app: ApplicationOptions): Promise<void> {
console.log('*** Downloading test extensions');

View File

@@ -3,15 +3,15 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { ISuiteCallbackContext, ITestCallbackContext } from 'mocha';
import { Suite, Context } from 'mocha';
export function describeRepeat(n: number, description: string, callback: (this: ISuiteCallbackContext) => void): void {
export function describeRepeat(n: number, description: string, callback: (this: Suite) => void): void {
for (let i = 0; i < n; i++) {
describe(`${description} (iteration ${i})`, callback);
}
}
export function itRepeat(n: number, description: string, callback: (this: ITestCallbackContext, done: MochaDone) => any): void {
export function itRepeat(n: number, description: string, callback: (this: Context) => any): void {
for (let i = 0; i < n; i++) {
it(`${description} (iteration ${i})`, callback);
}