mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
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:
@@ -27,13 +27,13 @@ export function setup() {
|
||||
await app.workbench.editor.waitForTypeInEditor('app.js', '.foo{}');
|
||||
await app.workbench.editors.saveOpenedFile();
|
||||
|
||||
await app.workbench.quickopen.openFile('index.jade');
|
||||
await app.workbench.editor.waitForTypeInEditor('index.jade', 'hello world');
|
||||
await app.workbench.quickopen.openFile('index.pug');
|
||||
await app.workbench.editor.waitForTypeInEditor('index.pug', 'hello world');
|
||||
await app.workbench.editors.saveOpenedFile();
|
||||
|
||||
await app.workbench.scm.refreshSCMViewlet();
|
||||
await app.workbench.scm.waitForChange('app.js', 'Modified');
|
||||
await app.workbench.scm.waitForChange('index.jade', 'Modified');
|
||||
await app.workbench.scm.waitForChange('index.pug', 'Modified');
|
||||
});
|
||||
|
||||
it('opens diff editor', async function () {
|
||||
@@ -66,7 +66,7 @@ export function setup() {
|
||||
await app.code.waitForTextContent(SYNC_STATUSBAR, ' 0↓ 1↑');
|
||||
|
||||
await app.workbench.quickopen.runCommand('Git: Stage All Changes');
|
||||
await app.workbench.scm.waitForChange('index.jade', 'Index Modified');
|
||||
await app.workbench.scm.waitForChange('index.pug', 'Index Modified');
|
||||
|
||||
await app.workbench.scm.commit('second commit');
|
||||
await app.code.waitForTextContent(SYNC_STATUSBAR, ' 0↓ 2↑');
|
||||
|
||||
@@ -19,7 +19,7 @@ export function setup() {
|
||||
await app.workbench.search.openSearchViewlet();
|
||||
await app.workbench.search.searchFor('body');
|
||||
|
||||
await app.workbench.search.waitForResultText('21 results in 6 files');
|
||||
await app.workbench.search.waitForResultText('16 results in 5 files');
|
||||
});
|
||||
|
||||
it('searches only for *.js files & checks for correct result number', async function () {
|
||||
@@ -38,7 +38,7 @@ export function setup() {
|
||||
const app = this.app as Application;
|
||||
await app.workbench.search.searchFor('body');
|
||||
await app.workbench.search.removeFileMatch('app.js');
|
||||
await app.workbench.search.waitForResultText('17 results in 5 files');
|
||||
await app.workbench.search.waitForResultText('12 results in 4 files');
|
||||
});
|
||||
|
||||
it('replaces first search result with a replace term', async function () {
|
||||
@@ -48,7 +48,7 @@ export function setup() {
|
||||
await app.workbench.search.expandReplace();
|
||||
await app.workbench.search.setReplaceText('ydob');
|
||||
await app.workbench.search.replaceFileMatch('app.js');
|
||||
await app.workbench.search.waitForResultText('17 results in 5 files');
|
||||
await app.workbench.search.waitForResultText('16 results in 5 files');
|
||||
|
||||
await app.workbench.search.searchFor('ydob');
|
||||
await app.workbench.search.setReplaceText('body');
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
import { Viewlet } from '../workbench/viewlet';
|
||||
import { Code } from '../../vscode/code';
|
||||
|
||||
const VIEWLET = 'div[id="workbench.view.search"].search-view';
|
||||
const VIEWLET = '.search-view';
|
||||
const INPUT = `${VIEWLET} .search-widget .search-container .monaco-inputbox textarea`;
|
||||
const INCLUDE_INPUT = `${VIEWLET} .query-details .file-types.includes .monaco-inputbox input`;
|
||||
const FILE_MATCH = filename => `${VIEWLET} .results .filematch[data-resource$="${filename}"]`;
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user