Vscode merge (#4582)

* Merge from vscode 37cb23d3dd4f9433d56d4ba5ea3203580719a0bd

* fix issues with merges

* bump node version in azpipe

* replace license headers

* remove duplicate launch task

* fix build errors

* fix build errors

* fix tslint issues

* working through package and linux build issues

* more work

* wip

* fix packaged builds

* working through linux build errors

* wip

* wip

* wip

* fix mac and linux file limits

* iterate linux pipeline

* disable editor typing

* revert series to parallel

* remove optimize vscode from linux

* fix linting issues

* revert testing change

* add work round for new node

* readd packaging for extensions

* fix issue with angular not resolving decorator dependencies
This commit is contained in:
Anthony Dresser
2019-03-19 17:44:35 -07:00
committed by GitHub
parent 833d197412
commit 87765e8673
1879 changed files with 54505 additions and 38058 deletions

View File

@@ -3,109 +3,93 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { Application, Quality } from '../../application';
import * as rimraf from 'rimraf';
import { Application, ApplicationOptions } from '../../application';
import { join } from 'path';
export interface ICreateAppFn {
(quality: Quality): Application;
}
export function setup(stableCodePath: string, testDataPath: string) {
export function setup(userDataDir: string, createApp: ICreateAppFn) {
describe('Data Migration', () => {
describe('Data Migration: This test MUST run before releasing by providing the --stable-build command line argument', () => {
it(`verifies opened editors are restored`, async function () {
if (!stableCodePath) {
this.skip();
}
afterEach(async function () {
await new Promise((c, e) => rimraf(userDataDir, { maxBusyTries: 10 }, err => err ? e(err) : c()));
const userDataDir = join(testDataPath, 'd2'); // different data dir from the other tests
const stableOptions: ApplicationOptions = Object.assign({}, this.defaultOptions);
stableOptions.codePath = stableCodePath;
stableOptions.userDataDir = userDataDir;
const stableApp = new Application(stableOptions);
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.quickopen.openFile('app.js');
await stableApp.workbench.quickopen.runCommand('View: Keep Editor');
await stableApp.workbench.editors.newUntitledFile();
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 parth */);
// Verify 3 editors are open
await insidersApp.workbench.editors.waitForEditorFocus('Untitled-1');
await insidersApp.workbench.editors.selectTab('app.js');
await insidersApp.workbench.editors.selectTab('www');
await insidersApp.stop();
});
// it('checks if the Untitled file is restored migrating from stable to latest', async function () {
// const stableApp = createApp(Quality.Stable);
it(`verifies that 'hot exit' works for dirty files`, async function () {
if (!stableCodePath) {
this.skip();
}
// if (!stableApp) {
// this.skip();
// return;
// }
const userDataDir = join(testDataPath, 'd3'); // different data dir from the other tests
// await stableApp.start();
const stableOptions: ApplicationOptions = Object.assign({}, this.defaultOptions);
stableOptions.codePath = stableCodePath;
stableOptions.userDataDir = userDataDir;
// const textToType = 'Very dirty file';
const stableApp = new Application(stableOptions);
await stableApp!.start();
// await stableApp.workbench.editors.newUntitledFile();
// await stableApp.workbench.editor.waitForTypeInEditor('Untitled-1', textToType);
await stableApp.workbench.editors.newUntitledFile();
// await stableApp.stop();
// await new Promise(c => setTimeout(c, 500)); // wait until all resources are released (e.g. locked local storage)
const untitled = 'Untitled-1';
const textToTypeInUntitled = 'Hello, Unitled Code';
await stableApp.workbench.editor.waitForTypeInEditor(untitled, textToTypeInUntitled);
// // Checking latest version for the restored state
// const app = createApp(Quality.Insiders);
const readmeMd = 'readme.md';
const textToType = 'Hello, Code';
await stableApp.workbench.quickopen.openFile(readmeMd);
await stableApp.workbench.editor.waitForTypeInEditor(readmeMd, textToType);
// await app.start(false);
await stableApp.stop();
// await app.workbench.editors.waitForActiveTab('Untitled-1', true);
// await app.workbench.editor.waitForEditorContents('Untitled-1', c => c.indexOf(textToType) > -1);
const insiderOptions: ApplicationOptions = Object.assign({}, this.defaultOptions);
insiderOptions.userDataDir = userDataDir;
// await app.stop();
// });
const insidersApp = new Application(insiderOptions);
await insidersApp!.start(false /* not expecting walkthrough parth */);
// it('checks if the newly created dirty file is restored migrating from stable to latest', async function () {
// const stableApp = createApp(Quality.Stable);
await insidersApp.workbench.editors.waitForActiveTab(readmeMd, true);
await insidersApp.workbench.editor.waitForEditorContents(readmeMd, c => c.indexOf(textToType) > -1);
// if (!stableApp) {
// this.skip();
// return;
// }
await insidersApp.workbench.editors.waitForTab(untitled, true);
await insidersApp.workbench.editors.selectTab(untitled, true);
await insidersApp.workbench.editor.waitForEditorContents(untitled, c => c.indexOf(textToTypeInUntitled) > -1);
// await stableApp.start();
// const fileName = 'app.js';
// const textPart = 'This is going to be an unsaved file';
// await stableApp.workbench.quickopen.openFile(fileName);
// await stableApp.workbench.editor.waitForTypeInEditor(fileName, textPart);
// await stableApp.stop();
// await new Promise(c => setTimeout(c, 500)); // wait until all resources are released (e.g. locked local storage)
// // Checking latest version for the restored state
// const app = createApp(Quality.Insiders);
// await app.start(false);
// await app.workbench.editors.waitForActiveTab(fileName);
// await app.workbench.editor.waitForEditorContents(fileName, c => c.indexOf(textPart) > -1);
// await app.stop();
// });
// it('checks if opened tabs are restored migrating from stable to latest', async function () {
// const stableApp = createApp(Quality.Stable);
// if (!stableApp) {
// this.skip();
// return;
// }
// await stableApp.start();
// const fileName1 = 'app.js', fileName2 = 'jsconfig.json', fileName3 = 'readme.md';
// await stableApp.workbench.quickopen.openFile(fileName1);
// await stableApp.workbench.runCommand('View: Keep Editor');
// await stableApp.workbench.quickopen.openFile(fileName2);
// await stableApp.workbench.runCommand('View: Keep Editor');
// await stableApp.workbench.quickopen.openFile(fileName3);
// await stableApp.stop();
// const app = createApp(Quality.Insiders);
// await app.start(false);
// await app.workbench.editors.waitForTab(fileName1);
// await app.workbench.editors.waitForTab(fileName2);
// await app.workbench.editors.waitForTab(fileName3);
// await app.stop();
// });
await insidersApp.stop();
});
});
}