mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-13 17:22:15 -05:00
Merge from vscode 64980ea1f3f532c82bb6c28d27bba9ef2c5b4463 (#7206)
* Merge from vscode 64980ea1f3f532c82bb6c28d27bba9ef2c5b4463 * fix config changes * fix strictnull checks
This commit is contained in:
7
test/automation/.gitignore
vendored
Normal file
7
test/automation/.gitignore
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
.DS_Store
|
||||
npm-debug.log
|
||||
Thumbs.db
|
||||
node_modules/
|
||||
out/
|
||||
keybindings.*.json
|
||||
src/driver.d.ts
|
||||
3
test/automation/README.md
Normal file
3
test/automation/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# VS Code Automation Package
|
||||
|
||||
This package contains functionality for automating various components of the VS Code UI, via an automation "driver" that connects from a separate process. It is used by the `smoke` tests.
|
||||
40
test/automation/package.json
Normal file
40
test/automation/package.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"name": "vscode-automation",
|
||||
"version": "1.39.0",
|
||||
"description": "VS Code UI automation driver",
|
||||
"author": {
|
||||
"name": "Microsoft Corporation"
|
||||
},
|
||||
"license": "MIT",
|
||||
"main": "./out/index.js",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"postinstall": "npm run compile",
|
||||
"compile": "npm run copy-driver && npm run copy-driver-definition && tsc",
|
||||
"watch": "concurrently \"npm run watch-driver\" \"npm run watch-driver-definition\" \"tsc --watch\"",
|
||||
"copy-driver": "cpx src/driver.js out/",
|
||||
"watch-driver": "cpx src/driver.js out/ -w",
|
||||
"copy-driver-definition": "node tools/copy-driver-definition.js",
|
||||
"watch-driver-definition": "watch \"node tools/copy-driver-definition.js\" ../../src/vs/platform/driver/node",
|
||||
"copy-package-version": "node tools/copy-package-version.js",
|
||||
"prepublishOnly": "npm run copy-package-version"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/mkdirp": "0.5.1",
|
||||
"@types/ncp": "2.0.1",
|
||||
"@types/node": "8.0.33",
|
||||
"@types/puppeteer": "^1.19.0",
|
||||
"@types/tmp": "0.1.0",
|
||||
"concurrently": "^3.5.1",
|
||||
"cpx": "^1.5.0",
|
||||
"typescript": "2.9.2",
|
||||
"watch": "^1.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"mkdirp": "^0.5.1",
|
||||
"ncp": "^2.0.0",
|
||||
"puppeteer": "^1.19.0",
|
||||
"tmp": "0.1.0",
|
||||
"vscode-uri": "^2.0.3"
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Code } from '../../vscode/code';
|
||||
import { Code } from './code';
|
||||
|
||||
export const enum ActivityBarPosition {
|
||||
LEFT = 0,
|
||||
@@ -27,4 +27,4 @@ export class ActivityBar {
|
||||
|
||||
await this.code.waitForElement(`.part.activitybar.${positionClass}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,8 +5,8 @@
|
||||
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import { Workbench } from './areas/workbench/workbench';
|
||||
import { Code, spawn, SpawnOptions } from './vscode/code';
|
||||
import { Workbench } from './workbench';
|
||||
import { Code, spawn, SpawnOptions } from './code';
|
||||
import { Logger } from './logger';
|
||||
|
||||
export const enum Quality {
|
||||
@@ -25,7 +25,7 @@ export interface ApplicationOptions extends SpawnOptions {
|
||||
export class Application {
|
||||
|
||||
private _code: Code | undefined;
|
||||
private _workbench: Workbench;
|
||||
private _workbench: Workbench | undefined;
|
||||
|
||||
constructor(private options: ApplicationOptions) {
|
||||
this._workspacePathOrFolder = options.workspacePath;
|
||||
@@ -40,7 +40,7 @@ export class Application {
|
||||
}
|
||||
|
||||
get workbench(): Workbench {
|
||||
return this._workbench;
|
||||
return this._workbench!;
|
||||
}
|
||||
|
||||
get logger(): Logger {
|
||||
@@ -74,7 +74,7 @@ export class Application {
|
||||
await this.code.waitForElement('.explorer-folders-view');
|
||||
|
||||
if (expectWalkthroughPart) {
|
||||
await this.code.waitForActiveElement(`.editor-instance[id="workbench.editor.walkThroughPart"] > div > div[tabIndex="0"]`);
|
||||
await this.code.waitForActiveElement(`.editor-instance[data-editor-id="workbench.editor.walkThroughPart"] > div > div[tabIndex="0"]`);
|
||||
}
|
||||
*/
|
||||
//{{SQL CARBON EDIT}}
|
||||
@@ -149,7 +149,7 @@ export class Application {
|
||||
await this.code.waitForElement('.monaco-workbench');
|
||||
|
||||
if (this.remote) {
|
||||
await this.code.waitForElement('.monaco-workbench .statusbar-item[id="status.host"]');
|
||||
await this.code.waitForTextContent('.monaco-workbench .statusbar-item[id="status.host"]', ' TestResolver');
|
||||
}
|
||||
|
||||
// wait a bit, since focus might be stolen off widgets
|
||||
@@ -11,11 +11,11 @@ import * as mkdirp from 'mkdirp';
|
||||
import { tmpName } from 'tmp';
|
||||
import { IDriver, connect as connectElectronDriver, IDisposable, IElement, Thenable } from './driver';
|
||||
import { connect as connectPuppeteerDriver, launch } from './puppeteerDriver';
|
||||
import { Logger } from '../logger';
|
||||
import { Logger } from './logger';
|
||||
import { ncp } from 'ncp';
|
||||
import { URI } from 'vscode-uri';
|
||||
|
||||
const repoPath = path.join(__dirname, '../../../..');
|
||||
const repoPath = path.join(__dirname, '../../..');
|
||||
|
||||
function getDevElectronPath(): string {
|
||||
const buildPath = path.join(repoPath, '.build');
|
||||
@@ -237,13 +237,14 @@ export class Code {
|
||||
throw new Error('Invalid usage');
|
||||
}
|
||||
|
||||
if (typeof target[prop] !== 'function') {
|
||||
return target[prop];
|
||||
const targetProp = (target as any)[prop];
|
||||
if (typeof targetProp !== 'function') {
|
||||
return targetProp;
|
||||
}
|
||||
|
||||
return function (...args) {
|
||||
return function (this: any, ...args: any[]) {
|
||||
logger.log(`${prop}`, ...args.filter(a => typeof a === 'string'));
|
||||
return target[prop].apply(this, args);
|
||||
return targetProp.apply(this, args);
|
||||
};
|
||||
}
|
||||
});
|
||||
@@ -3,12 +3,12 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Viewlet } from '../workbench/viewlet';
|
||||
import { Commands } from '../workbench/workbench';
|
||||
import { Code, findElement } from '../../vscode/code';
|
||||
import { Editors } from '../editor/editors';
|
||||
import { Editor } from '../editor/editor';
|
||||
import { IElement } from '../../vscode/driver';
|
||||
import { Viewlet } from './viewlet';
|
||||
import { Commands } from './workbench';
|
||||
import { Code, findElement } from './code';
|
||||
import { Editors } from './editors';
|
||||
import { Editor } from './editor';
|
||||
import { IElement } from '../src/driver';
|
||||
|
||||
const VIEWLET = 'div[id="workbench.view.debug"]';
|
||||
const DEBUG_VIEW = `${VIEWLET} .debug-view-content`;
|
||||
@@ -25,10 +25,10 @@ const DEBUG_STATUS_BAR = `.statusbar.debugging`;
|
||||
const NOT_DEBUG_STATUS_BAR = `.statusbar:not(debugging)`;
|
||||
const TOOLBAR_HIDDEN = `.debug-toolbar[aria-hidden="true"]`;
|
||||
const STACK_FRAME = `${VIEWLET} .monaco-list-row .stack-frame`;
|
||||
const SPECIFIC_STACK_FRAME = filename => `${STACK_FRAME} .file[title*="${filename}"]`;
|
||||
const SPECIFIC_STACK_FRAME = (filename: string) => `${STACK_FRAME} .file[title*="${filename}"]`;
|
||||
const VARIABLE = `${VIEWLET} .debug-variables .monaco-list-row .expression`;
|
||||
const CONSOLE_OUTPUT = `.repl .output.expression .value`;
|
||||
const CONSOLE_INPUT_OUTPUT = `.repl .input-output-pair .output.expression .value`;
|
||||
const CONSOLE_EVALUATION_RESULT = `.repl .evaluation-result.expression .value`;
|
||||
|
||||
const REPL_FOCUSED = '.repl-input-wrapper .monaco-editor textarea';
|
||||
|
||||
@@ -132,8 +132,8 @@ export class Debug extends Viewlet {
|
||||
// Wait for the keys to be picked up by the editor model such that repl evalutes what just got typed
|
||||
await this.editor.waitForEditorContents('debug:replinput', s => s.indexOf(text) >= 0);
|
||||
await this.code.dispatchKeybinding('enter');
|
||||
await this.code.waitForElement(CONSOLE_INPUT_OUTPUT);
|
||||
await this.waitForOutput(output => accept(output[output.length - 1] || ''));
|
||||
await this.code.waitForElements(CONSOLE_EVALUATION_RESULT, false,
|
||||
elements => !!elements.length && accept(elements[elements.length - 1].textContent));
|
||||
}
|
||||
|
||||
// Different node versions give different number of variables. As a workaround be more relaxed when checking for variable count
|
||||
@@ -4,14 +4,14 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { References } from './peek';
|
||||
import { Commands } from '../workbench/workbench';
|
||||
import { Code } from '../../vscode/code';
|
||||
import { Commands } from './workbench';
|
||||
import { Code } from './code';
|
||||
|
||||
const RENAME_BOX = '.monaco-editor .monaco-editor.rename-box';
|
||||
const RENAME_INPUT = `${RENAME_BOX} .rename-input`;
|
||||
const EDITOR = filename => `.monaco-editor[data-uri$="${filename}"]`;
|
||||
const VIEW_LINES = filename => `${EDITOR(filename)} .view-lines`;
|
||||
const LINE_NUMBERS = filename => `${EDITOR(filename)} .margin .margin-view-overlays .line-numbers`;
|
||||
const EDITOR = (filename: string) => `.monaco-editor[data-uri$="${filename}"]`;
|
||||
const VIEW_LINES = (filename: string) => `${EDITOR(filename)} .view-lines`;
|
||||
const LINE_NUMBERS = (filename: string) => `${EDITOR(filename)} .margin .margin-view-overlays .line-numbers`;
|
||||
|
||||
export class Editor {
|
||||
|
||||
@@ -130,4 +130,4 @@ export class Editor {
|
||||
|
||||
throw new Error('Line not found');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Code } from '../../vscode/code';
|
||||
import { Code } from './code';
|
||||
|
||||
export class Editors {
|
||||
|
||||
@@ -49,4 +49,4 @@ export class Editors {
|
||||
|
||||
await this.waitForEditorFocus('Untitled-1', true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,9 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Viewlet } from '../workbench/viewlet';
|
||||
import { Editors } from '../editor/editors';
|
||||
import { Code } from '../../vscode/code';
|
||||
import { Viewlet } from './viewlet';
|
||||
import { Editors } from './editors';
|
||||
import { Code } from './code';
|
||||
|
||||
export class Explorer extends Viewlet {
|
||||
|
||||
@@ -45,4 +45,4 @@ export class Explorer extends Viewlet {
|
||||
throw new Error('No class defined for this file extension');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,8 +3,8 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Viewlet } from '../workbench/viewlet';
|
||||
import { Code } from '../../vscode/code';
|
||||
import { Viewlet } from './viewlet';
|
||||
import { Code } from './code';
|
||||
|
||||
const SEARCH_BOX = 'div.extensions-viewlet[id="workbench.view.extensions"] .monaco-editor textarea';
|
||||
|
||||
@@ -40,4 +40,4 @@ export class Extensions extends Viewlet {
|
||||
await this.code.waitAndClick(`div.extensions-viewlet[id="workbench.view.extensions"] .monaco-list-row[aria-label="${ariaLabel}"] .extension li[class='action-item'] .extension-action.install`);
|
||||
await this.code.waitForElement(`.extension-editor .monaco-action-bar .action-item:not(.disabled) .extension-action.uninstall`);
|
||||
}
|
||||
}
|
||||
}
|
||||
34
test/automation/src/index.ts
Normal file
34
test/automation/src/index.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
export * from './activityBar';
|
||||
export * from './application';
|
||||
export * from './code';
|
||||
export * from './debug';
|
||||
export * from './editor';
|
||||
export * from './editors';
|
||||
export * from './explorer';
|
||||
export * from './extensions';
|
||||
export * from './keybindings';
|
||||
export * from './logger';
|
||||
export * from './peek';
|
||||
export * from './problems';
|
||||
export * from './quickinput';
|
||||
export * from './quickopen';
|
||||
export * from './scm';
|
||||
export * from './search';
|
||||
export * from './settings';
|
||||
export * from './statusbar';
|
||||
export * from './terminal';
|
||||
export * from './viewlet';
|
||||
export * from './workbench';
|
||||
export * from '../src/driver';
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
export * from './sql/connectionDialog';
|
||||
export * from './sql/profiler';
|
||||
export * from './sql/queryEditors';
|
||||
export * from './sql/sqlutils';
|
||||
export * from './sql/testConfig';
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Code } from '../../vscode/code';
|
||||
import { Code } from './code';
|
||||
|
||||
const SEARCH_INPUT = '.keybindings-header .settings-search-input input';
|
||||
|
||||
@@ -31,4 +31,4 @@ export class KeybindingsEditor {
|
||||
await this.code.dispatchKeybinding('enter');
|
||||
await this.code.waitForElement(`.keybindings-list-container div[aria-label="Keybinding is ${ariaLabel}."]`);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Code } from '../../vscode/code';
|
||||
import { Code } from './code';
|
||||
|
||||
export class References {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Code } from '../../vscode/code';
|
||||
import { Code } from './code';
|
||||
|
||||
export const enum ProblemSeverity {
|
||||
WARNING = 0,
|
||||
@@ -8,11 +8,12 @@ import { ChildProcess, spawn } from 'child_process';
|
||||
import { join } from 'path';
|
||||
import { mkdir } from 'fs';
|
||||
import { promisify } from 'util';
|
||||
import { IDriver, IDisposable } from './driver';
|
||||
|
||||
const width = 1200;
|
||||
const height = 800;
|
||||
|
||||
const vscodeToPuppeteerKey = {
|
||||
const vscodeToPuppeteerKey: { [key: string]: string } = {
|
||||
cmd: 'Meta',
|
||||
ctrl: 'Control',
|
||||
shift: 'Shift',
|
||||
@@ -111,7 +112,7 @@ function teardown(): void {
|
||||
|
||||
function waitForEndpoint(): Promise<string> {
|
||||
return new Promise<string>(r => {
|
||||
server!.stdout.on('data', d => {
|
||||
server!.stdout.on('data', (d: Buffer) => {
|
||||
const matches = d.toString('ascii').match(/Web UI available at (.+)/);
|
||||
if (matches !== null) {
|
||||
r(matches[1]);
|
||||
@@ -139,54 +140,3 @@ export function connect(headless: boolean, outPath: string, handle: string): Pro
|
||||
c(result);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Thenable is a common denominator between ES6 promises, Q, jquery.Deferred, WinJS.Promise,
|
||||
* and others. This API makes no assumption about what promise library is being used which
|
||||
* enables reusing existing code without migrating to a specific promise implementation. Still,
|
||||
* we recommend the use of native promises which are available in this editor.
|
||||
*/
|
||||
export interface Thenable<T> {
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
* @param onrejected The callback to execute when the Promise is rejected.
|
||||
* @returns A Promise for the completion of which ever callback is executed.
|
||||
*/
|
||||
then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => TResult | Thenable<TResult>): Thenable<TResult>;
|
||||
then<TResult>(onfulfilled?: (value: T) => TResult | Thenable<TResult>, onrejected?: (reason: any) => void): Thenable<TResult>;
|
||||
}
|
||||
|
||||
export interface IElement {
|
||||
tagName: string;
|
||||
className: string;
|
||||
textContent: string;
|
||||
attributes: { [name: string]: string; };
|
||||
children: IElement[];
|
||||
top: number;
|
||||
left: number;
|
||||
}
|
||||
|
||||
export interface IDriver {
|
||||
_serviceBrand: any;
|
||||
|
||||
getWindowIds(): Promise<number[]>;
|
||||
capturePage(windowId: number): Promise<string>;
|
||||
reloadWindow(windowId: number): Promise<void>;
|
||||
exitApplication(): Promise<void>;
|
||||
dispatchKeybinding(windowId: number, keybinding: string): Promise<void>;
|
||||
click(windowId: number, selector: string, xoffset?: number | undefined, yoffset?: number | undefined): Promise<void>;
|
||||
doubleClick(windowId: number, selector: string): Promise<void>;
|
||||
setValue(windowId: number, selector: string, text: string): Promise<void>;
|
||||
getTitle(windowId: number): Promise<string>;
|
||||
isActiveElement(windowId: number, selector: string): Promise<boolean>;
|
||||
getElements(windowId: number, selector: string, recursive?: boolean): Promise<IElement[]>;
|
||||
getElementXY(windowId: number, selector: string, xoffset?: number, yoffset?: number): Promise<{ x: number; y: number; }>;
|
||||
typeInEditor(windowId: number, selector: string, text: string): Promise<void>;
|
||||
getTerminalBuffer(windowId: number, selector: string): Promise<string[]>;
|
||||
writeInTerminal(windowId: number, selector: string, text: string): Promise<void>;
|
||||
}
|
||||
|
||||
export interface IDisposable {
|
||||
dispose(): void;
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Code } from '../../vscode/code';
|
||||
import { Code } from './code';
|
||||
|
||||
export class QuickInput {
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Editors } from '../editor/editors';
|
||||
import { Code } from '../../vscode/code';
|
||||
import { Editors } from './editors';
|
||||
import { Code } from './code';
|
||||
|
||||
export class QuickOpen {
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Viewlet } from '../workbench/viewlet';
|
||||
import { IElement } from '../../vscode/driver';
|
||||
import { findElement, findElements, Code } from '../../vscode/code';
|
||||
import { Viewlet } from './viewlet';
|
||||
import { IElement } from '../src/driver';
|
||||
import { findElement, findElements, Code } from './code';
|
||||
|
||||
const VIEWLET = 'div[id="workbench.view.scm"]';
|
||||
const SCM_INPUT = `${VIEWLET} .scm-editor textarea`;
|
||||
@@ -76,4 +76,4 @@ export class SCM extends Viewlet {
|
||||
await this.code.waitForSetValue(SCM_INPUT, message);
|
||||
await this.code.waitAndClick(COMMIT_COMMAND);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,13 +3,13 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Viewlet } from '../workbench/viewlet';
|
||||
import { Code } from '../../vscode/code';
|
||||
import { Viewlet } from './viewlet';
|
||||
import { Code } from './code';
|
||||
|
||||
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}"]`;
|
||||
const FILE_MATCH = (filename: string) => `${VIEWLET} .results .filematch[data-resource$="${filename}"]`;
|
||||
|
||||
async function retry(setup: () => Promise<any>, attempt: () => Promise<any>) {
|
||||
let count = 0;
|
||||
@@ -5,15 +5,10 @@
|
||||
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import { Editor } from '../editor/editor';
|
||||
import { Editors } from '../editor/editors';
|
||||
import { Code } from '../../vscode/code';
|
||||
import { QuickOpen } from '../quickopen/quickopen';
|
||||
|
||||
export const enum ActivityBarPosition {
|
||||
LEFT = 0,
|
||||
RIGHT = 1
|
||||
}
|
||||
import { Editor } from './editor';
|
||||
import { Editors } from './editors';
|
||||
import { Code } from './code';
|
||||
import { QuickOpen } from './quickopen';
|
||||
|
||||
export class SettingsEditor {
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Code } from '../../vscode/code';
|
||||
import { waitForNewDialog, clickDialogButton } from '../sqlutils';
|
||||
import { TestServerProfile, AuthenticationType } from '../testConfig';
|
||||
import { Code } from '../code';
|
||||
import { waitForNewDialog, clickDialogButton } from './sqlutils';
|
||||
import { TestServerProfile, AuthenticationType } from './testConfig';
|
||||
|
||||
const CONNECTION_DIALOG_TITLE = 'Connection';
|
||||
const CONNECTION_DIALOG_SELECTOR: string = '.modal-dialog .modal-content .modal-body .connection-dialog';
|
||||
@@ -48,4 +48,4 @@ export class ConnectionDialog {
|
||||
private async selectAuthType(authType: string) {
|
||||
await this.code.waitAndClick(`.context-view.bottom.left .monaco-select-box-dropdown-container .select-box-dropdown-list-container .monaco-list .monaco-scrollable-element .monaco-list-rows .monaco-list-row div[aria-label="${authType}"][class*="option-text"]`);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,9 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Code } from '../../vscode/code';
|
||||
import { QuickOpen } from '../../areas/quickopen/quickopen';
|
||||
import { waitForNewDialog, clickDialogButton } from '../sqlutils';
|
||||
import { Code } from '../code';
|
||||
import { QuickOpen } from '../quickopen';
|
||||
import { waitForNewDialog, clickDialogButton } from './sqlutils';
|
||||
|
||||
const NEW_SESSION_DIALOG_TITLE: string = 'Start New Profiler Session';
|
||||
|
||||
@@ -25,4 +25,4 @@ export class Profiler {
|
||||
await this.waitForNewSessionDialog();
|
||||
await clickDialogButton(this.code, 'Start');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,9 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Editors } from '../../areas/editor/editors';
|
||||
import { QuickOpen } from '../../areas/quickopen/quickopen';
|
||||
import { Code } from '../../vscode/code';
|
||||
import { Editors } from '../editors';
|
||||
import { QuickOpen } from '../quickopen';
|
||||
import { Code } from '../code';
|
||||
import * as path from 'path';
|
||||
|
||||
export class QueryEditors extends Editors {
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Code } from '../vscode/code';
|
||||
import { Code } from '../code';
|
||||
|
||||
export async function waitForNewDialog(code: Code, title: string) {
|
||||
await code.waitForElement(`div[aria-label="${title}"][class="modal fade flyout-dialog"]`);
|
||||
@@ -11,4 +11,4 @@ export async function waitForNewDialog(code: Code, title: string) {
|
||||
|
||||
export async function clickDialogButton(code: Code, title: string) {
|
||||
await code.waitAndClick(`.modal-dialog .modal-content .modal-footer .right-footer .footer-button a[aria-label="${title}"][aria-disabled="false"]`);
|
||||
}
|
||||
}
|
||||
@@ -41,8 +41,8 @@ export enum EngineType {
|
||||
BigDataCluster
|
||||
}
|
||||
|
||||
let connectionProviderMapping = {};
|
||||
let authenticationTypeMapping = {};
|
||||
let connectionProviderMapping: { [key: string]: any } = {};
|
||||
let authenticationTypeMapping: { [key: string]: any } = {};
|
||||
connectionProviderMapping[ConnectionProvider.SQLServer] = { name: 'MSSQL', displayName: 'Microsoft SQL Server' };
|
||||
|
||||
authenticationTypeMapping[AuthenticationType.SqlLogin] = { name: 'SqlLogin', displayName: 'SQL Login' };
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Code } from '../../vscode/code';
|
||||
import { Code } from './code';
|
||||
|
||||
export const enum StatusBarElement {
|
||||
BRANCH_STATUS = 0,
|
||||
@@ -3,8 +3,8 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Code } from '../../vscode/code';
|
||||
import { QuickOpen } from '../quickopen/quickopen';
|
||||
import { Code } from './code';
|
||||
import { QuickOpen } from './quickopen';
|
||||
|
||||
const PANEL_SELECTOR = 'div[id="workbench.panel.terminal"]';
|
||||
const XTERM_SELECTOR = `${PANEL_SELECTOR} .terminal-wrapper`;
|
||||
@@ -30,4 +30,4 @@ export class Terminal {
|
||||
async waitForTerminalText(accept: (buffer: string[]) => boolean): Promise<void> {
|
||||
await this.code.waitForTerminalBuffer(XTERM_SELECTOR, accept);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Code } from '../../vscode/code';
|
||||
import { Code } from './code';
|
||||
|
||||
export abstract class Viewlet {
|
||||
|
||||
@@ -12,4 +12,4 @@ export abstract class Viewlet {
|
||||
async waitForTitle(fn: (title: string) => boolean): Promise<void> {
|
||||
await this.code.waitForTextContent('.monaco-workbench .part.sidebar > .title > .title-label > h2', undefined, fn);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3,27 +3,27 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Explorer } from '../explorer/explorer';
|
||||
import { ActivityBar } from '../activitybar/activityBar';
|
||||
import { QuickOpen } from '../quickopen/quickopen';
|
||||
import { QuickInput } from '../quickinput/quickinput';
|
||||
import { Extensions } from '../extensions/extensions';
|
||||
import { Search } from '../search/search';
|
||||
import { Editor } from '../editor/editor';
|
||||
import { SCM } from '../git/scm';
|
||||
import { Debug } from '../debug/debugSmoke';
|
||||
import { StatusBar } from '../statusbar/statusbar';
|
||||
import { Problems } from '../problems/problems';
|
||||
import { SettingsEditor } from '../preferences/settings';
|
||||
import { KeybindingsEditor } from '../preferences/keybindings';
|
||||
import { Editors } from '../editor/editors';
|
||||
import { Code } from '../../vscode/code';
|
||||
import { Terminal } from '../terminal/terminal';
|
||||
import { Explorer } from './explorer';
|
||||
import { ActivityBar } from './activityBar';
|
||||
import { QuickOpen } from './quickopen';
|
||||
import { QuickInput } from './quickinput';
|
||||
import { Extensions } from './extensions';
|
||||
import { Search } from './search';
|
||||
import { Editor } from './editor';
|
||||
import { SCM } from './scm';
|
||||
import { Debug } from './debug';
|
||||
import { StatusBar } from './statusbar';
|
||||
import { Problems } from './problems';
|
||||
import { SettingsEditor } from './settings';
|
||||
import { KeybindingsEditor } from './keybindings';
|
||||
import { Editors } from './editors';
|
||||
import { Code } from './code';
|
||||
import { Terminal } from './terminal';
|
||||
|
||||
// {{SQL CARBON EDIT}}
|
||||
import { ConnectionDialog } from '../../sql/connectionDialog/connectionDialog';
|
||||
import { Profiler } from '../../sql/profiler/profiler';
|
||||
import { QueryEditors } from '../../sql/queryEditor/queryEditors';
|
||||
import { ConnectionDialog } from './sql/connectionDialog';
|
||||
import { Profiler } from './sql/profiler';
|
||||
import { QueryEditors } from './sql/queryEditors';
|
||||
// {{END}}
|
||||
|
||||
export interface Commands {
|
||||
@@ -44,7 +44,8 @@ export interface IDisposable {
|
||||
export function connect(outPath: string, handle: string): Promise<{ client: IDisposable, driver: IDriver }>;
|
||||
`;
|
||||
|
||||
const srcPath = path.join(path.dirname(__dirname), 'src/vscode');
|
||||
const outDriverPath = path.join(srcPath, 'driver.d.ts');
|
||||
const srcPath = path.join(path.dirname(__dirname), 'src');
|
||||
const outPath = path.join(path.dirname(__dirname), 'out');
|
||||
|
||||
fs.writeFileSync(outDriverPath, contents);
|
||||
fs.writeFileSync(path.join(srcPath, 'driver.d.ts'), contents);
|
||||
fs.writeFileSync(path.join(outPath, 'driver.d.ts'), contents);
|
||||
19
test/automation/tools/copy-package-version.js
Normal file
19
test/automation/tools/copy-package-version.js
Normal file
@@ -0,0 +1,19 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const packageDir = path.dirname(__dirname);
|
||||
const root = path.dirname(path.dirname(path.dirname(__dirname)));
|
||||
|
||||
const rootPackageJsonFile = path.join(root, 'package.json');
|
||||
const thisPackageJsonFile = path.join(packageDir, 'package.json');
|
||||
const rootPackageJson = JSON.parse(fs.readFileSync(rootPackageJsonFile, 'utf8'));
|
||||
const thisPackageJson = JSON.parse(fs.readFileSync(thisPackageJsonFile, 'utf8'));
|
||||
|
||||
thisPackageJson.version = rootPackageJson.version;
|
||||
|
||||
fs.writeFileSync(thisPackageJsonFile, JSON.stringify(thisPackageJson, null, ' '));
|
||||
21
test/automation/tsconfig.json
Normal file
21
test/automation/tsconfig.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es2016",
|
||||
"strict": true,
|
||||
"noUnusedParameters": false,
|
||||
"noUnusedLocals": true,
|
||||
"outDir": "out",
|
||||
"sourceMap": true,
|
||||
"declaration": true,
|
||||
"lib": [
|
||||
"es2016",
|
||||
"dom"
|
||||
]
|
||||
},
|
||||
"exclude": [
|
||||
"node_modules",
|
||||
"out",
|
||||
"tools",
|
||||
]
|
||||
}
|
||||
1842
test/automation/yarn.lock
Normal file
1842
test/automation/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
@@ -19,9 +19,9 @@
|
||||
// windows. This we cannot allow as it may crash
|
||||
// the test run.
|
||||
// !!! DO NOT CHANGE !!!
|
||||
window.open = function () {return null;};
|
||||
window.alert = function () {}
|
||||
window.confirm = function () {}
|
||||
window.open = function () { throw new Error('window.open() is not supported in tests!'); };
|
||||
window.alert = function () { throw new Error('window.alert() is not supported in tests!'); }
|
||||
window.confirm = function () { throw new Error('window.confirm() is not supported in tests!'); }
|
||||
|
||||
mocha.setup({
|
||||
ui: 'tdd',
|
||||
|
||||
@@ -5,10 +5,8 @@ Make sure you are on **Node v10.x**.
|
||||
### Run
|
||||
|
||||
```bash
|
||||
# Compile
|
||||
cd test/smoke
|
||||
yarn compile
|
||||
cd ../..
|
||||
# Install Dependencies and Compile
|
||||
yarn --cwd test/smoke
|
||||
|
||||
# Dev
|
||||
yarn smoketest
|
||||
@@ -26,7 +24,7 @@ You must always run the smoketest version which matches the release you are test
|
||||
|
||||
```bash
|
||||
git checkout release/1.22
|
||||
yarn
|
||||
yarn --cwd test/smoke
|
||||
```
|
||||
|
||||
In addition to the new build to be released you will need the previous stable build so that the smoketest can test the data migration.
|
||||
|
||||
@@ -4,12 +4,8 @@
|
||||
"main": "./src/main.js",
|
||||
"scripts": {
|
||||
"postinstall": "npm run compile",
|
||||
"compile": "npm run copy-driver && npm run copy-driver-definition && tsc",
|
||||
"watch": "concurrently \"npm run watch-driver\" \"npm run watch-driver-definition\" \"tsc --watch\"",
|
||||
"copy-driver": "cpx src/vscode/driver.js out/vscode",
|
||||
"watch-driver": "cpx src/vscode/driver.js out/vscode -w",
|
||||
"copy-driver-definition": "node tools/copy-driver-definition.js",
|
||||
"watch-driver-definition": "watch \"node tools/copy-driver-definition.js\" ../../src/vs/platform/driver/node",
|
||||
"compile": "yarn --cwd ../automation compile && tsc",
|
||||
"watch": "concurrently \"yarn --cwd ../automation watch --preserveWatchOutput\" \"tsc --watch --preserveWatchOutput\"",
|
||||
"mocha": "mocha"
|
||||
},
|
||||
"devDependencies": {
|
||||
@@ -18,12 +14,9 @@
|
||||
"@types/mocha": "2.2.41",
|
||||
"@types/ncp": "2.0.1",
|
||||
"@types/node": "^10.14.8",
|
||||
"@types/puppeteer": "^1.19.0",
|
||||
"@types/rimraf": "2.0.2",
|
||||
"@types/webdriverio": "4.6.1",
|
||||
"concurrently": "^3.5.1",
|
||||
"cpx": "^1.5.0",
|
||||
"electron": "4.2.9",
|
||||
"htmlparser2": "^3.9.2",
|
||||
"mkdirp": "^0.5.1",
|
||||
"mocha": "^5.2.0",
|
||||
@@ -36,8 +29,5 @@
|
||||
"tmp": "0.0.33",
|
||||
"typescript": "2.9.2",
|
||||
"watch": "^1.0.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"vscode-uri": "^2.0.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Application } from '../../application';
|
||||
import { ProblemSeverity, Problems } from '../problems/problems';
|
||||
import { Application, ProblemSeverity, Problems } from '../../../../automation';
|
||||
|
||||
export function setup() {
|
||||
describe('CSS', () => {
|
||||
@@ -44,4 +43,4 @@ export function setup() {
|
||||
await problems.hideProblemsView();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import * as http from 'http';
|
||||
import * as path from 'path';
|
||||
import * as fs from 'fs';
|
||||
import * as stripJsonComments from 'strip-json-comments';
|
||||
import { Application } from '../../application';
|
||||
import { Application } from '../../../../automation';
|
||||
|
||||
export function setup() {
|
||||
describe('Debug', () => {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Application } from '../../application';
|
||||
import { Application } from '../../../../automation';
|
||||
|
||||
export function setup() {
|
||||
describe('Editor', () => {
|
||||
@@ -67,4 +67,4 @@ export function setup() {
|
||||
await peek.waitForFile('app.js');
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Application } from '../../application';
|
||||
import { Application } from '../../../../automation';
|
||||
|
||||
export function setup() {
|
||||
describe('Explorer', () => {
|
||||
@@ -37,4 +37,4 @@ export function setup() {
|
||||
await app.code.dispatchKeybinding('escape');
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Application, Quality } from '../../application';
|
||||
import { Application, Quality } from '../../../../automation';
|
||||
|
||||
export function setup() {
|
||||
describe('Extensions', () => {
|
||||
@@ -28,4 +28,4 @@ export function setup() {
|
||||
await app.workbench.statusbar.waitForStatusbarText('smoke test', 'VS Code Smoke Test Check');
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as cp from 'child_process';
|
||||
import { Application } from '../../application';
|
||||
import { Application } from '../../../../automation';
|
||||
|
||||
const DIFF_EDITOR_LINE_INSERT = '.monaco-diff-editor .editor.modified .line-insert';
|
||||
const SYNC_STATUSBAR = 'div[id="workbench.parts.statusbar"] .statusbar-item[title$="Synchronize Changes"]';
|
||||
@@ -74,4 +74,4 @@ export function setup() {
|
||||
cp.execSync('git reset --hard origin/master', { cwd: app.workspacePathOrFolder });
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import { Application } from '../../application';
|
||||
import { Application } from '../../../../automation';
|
||||
|
||||
function toUri(path: string): string {
|
||||
if (process.platform === 'win32') {
|
||||
@@ -47,8 +47,7 @@ export function setup() {
|
||||
const app = this.app as Application;
|
||||
await app.workbench.quickopen.openQuickOpen('*.*');
|
||||
|
||||
// TODO roblourens: Go to files finds welcome page: issue 74875
|
||||
await app.workbench.quickopen.waitForQuickOpenElements(names => names.length === 6 || names.length === 7);
|
||||
await app.workbench.quickopen.waitForQuickOpenElements(names => names.length === 6);
|
||||
await app.workbench.quickopen.closeQuickOpen();
|
||||
});
|
||||
|
||||
@@ -57,4 +56,4 @@ export function setup() {
|
||||
await app.code.waitForTitle(title => /smoketest \(Workspace\)/i.test(title));
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Application } from '../../application';
|
||||
import { ActivityBarPosition } from '../activitybar/activityBar';
|
||||
import { Application, ActivityBarPosition } from '../../../../automation';
|
||||
|
||||
export function setup() {
|
||||
describe('Preferences', () => {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as cp from 'child_process';
|
||||
import { Application } from '../../application';
|
||||
import { Application } from '../../../../automation';
|
||||
|
||||
export function setup() {
|
||||
describe('Search', () => {
|
||||
@@ -56,4 +56,4 @@ export function setup() {
|
||||
await app.workbench.search.waitForNoResultText();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Application, Quality } from '../../application';
|
||||
import { StatusBarElement } from './statusbar';
|
||||
import { Application, Quality, StatusBarElement } from '../../../../automation';
|
||||
|
||||
export function setup() {
|
||||
describe('Statusbar', () => {
|
||||
@@ -90,4 +89,4 @@ export function setup() {
|
||||
await app.workbench.statusbar.waitForEOL('CRLF');
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Application } from '../../application';
|
||||
import { Application } from '../../../../automation';
|
||||
|
||||
export function setup() {
|
||||
describe('Terminal', () => {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Application } from '../../application';
|
||||
import { Application } from '../../../../automation';
|
||||
|
||||
export function setup() {
|
||||
describe('Dataloss', () => {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Application, ApplicationOptions } from '../../application';
|
||||
import { Application, ApplicationOptions } from '../../../../automation';
|
||||
import { join } from 'path';
|
||||
|
||||
export function setup(stableCodePath: string, testDataPath: string) {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import * as path from 'path';
|
||||
import { Application, ApplicationOptions } from '../../application';
|
||||
import { Application, ApplicationOptions } from '../../../../automation';
|
||||
|
||||
export function setup() {
|
||||
|
||||
@@ -35,4 +35,4 @@ export function setup() {
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Application, Quality } from '../../application';
|
||||
import { Application, Quality } from '../../../../automation';
|
||||
|
||||
export function setup() {
|
||||
describe('Localization', () => {
|
||||
|
||||
@@ -11,7 +11,15 @@ import * as tmp from 'tmp';
|
||||
import * as rimraf from 'rimraf';
|
||||
import * as mkdirp from 'mkdirp';
|
||||
import { ncp } from 'ncp';
|
||||
import { Application, Quality, ApplicationOptions } from './application';
|
||||
import {
|
||||
Application,
|
||||
Quality,
|
||||
ApplicationOptions,
|
||||
MultiLogger,
|
||||
Logger,
|
||||
ConsoleLogger,
|
||||
FileLogger,
|
||||
} from '../../automation';
|
||||
|
||||
//{{SQL CARBON EDIT}}
|
||||
import { setup as runProfilerTests } from './sql/profiler/profiler.test';
|
||||
@@ -33,10 +41,7 @@ import { setup as setupDataExtensionTests } from './areas/extensions/extensions.
|
||||
import { setup as setupTerminalTests } from './areas/terminal/terminal.test';
|
||||
import { setup as setupDataMultirootTests } from './areas/multiroot/multiroot.test';
|
||||
import { setup as setupDataLocalizationTests } from './areas/workbench/localization.test';
|
||||
import { setup as setupLaunchTests } from './areas/workbench/launch.test';
|
||||
*/
|
||||
//{{END}}
|
||||
import { MultiLogger, Logger, ConsoleLogger, FileLogger } from './logger';
|
||||
import { setup as setupLaunchTests } from './areas/workbench/launch.test';*///{{END}}
|
||||
|
||||
if (!/^v10/.test(process.version)) {
|
||||
console.error('Error: Smoketest must be run using Node 10. Currently running', process.version);
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Application } from '../../application';
|
||||
import { getStandaloneServer } from '../testConfig';
|
||||
import { Application, getStandaloneServer } from '../../../../automation';
|
||||
|
||||
export function setup() {
|
||||
describe('profiler test suite', () => {
|
||||
@@ -16,4 +15,4 @@ export function setup() {
|
||||
await app.workbench.profiler.waitForNewSessionDialogAndStart();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Application } from '../../application';
|
||||
import { Application } from '../../../../automation';
|
||||
import * as fs from 'fs';
|
||||
import * as os from 'os';
|
||||
import * as path from 'path';
|
||||
@@ -25,4 +25,4 @@ export function setup() {
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
"noImplicitAny": false,
|
||||
"removeComments": false,
|
||||
"preserveConstEnums": true,
|
||||
"target": "es2016",
|
||||
"target": "es2017",
|
||||
"strictNullChecks": true,
|
||||
"noUnusedParameters": false,
|
||||
"noUnusedLocals": true,
|
||||
@@ -18,4 +18,4 @@
|
||||
"exclude": [
|
||||
"node_modules"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -44,7 +44,7 @@
|
||||
|
||||
require.config({ baseUrl: '/static' });
|
||||
|
||||
require(['vs/base/browser/ui/tree/indexTree', 'vs/base/browser/ui/tree/compressedObjectTree', 'vs/base/browser/ui/tree/asyncDataTree', 'vs/base/browser/ui/tree/dataTree', 'vs/base/browser/ui/tree/tree', 'vs/base/common/iterator'], ({ IndexTree }, { CompressedObjectTree }, { AsyncDataTree }, { DataTree }, { TreeVisibility }, { iter }) => {
|
||||
require(['vs/base/browser/ui/tree/indexTree', 'vs/base/browser/ui/tree/objectTree', 'vs/base/browser/ui/tree/asyncDataTree', 'vs/base/browser/ui/tree/dataTree', 'vs/base/browser/ui/tree/tree', 'vs/base/common/iterator'], ({ IndexTree }, { CompressibleObjectTree }, { AsyncDataTree }, { DataTree }, { TreeVisibility }, { iter }) => {
|
||||
function createIndexTree(opts) {
|
||||
opts = opts || {};
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
}
|
||||
};
|
||||
|
||||
const tree = new IndexTree(container, delegate, [renderer], null, { ...opts, filter: treeFilter, setRowLineHeight: false });
|
||||
const tree = new IndexTree('test', container, delegate, [renderer], null, { ...opts, filter: treeFilter, setRowLineHeight: false });
|
||||
|
||||
return { tree, treeFilter };
|
||||
}
|
||||
@@ -113,11 +113,10 @@
|
||||
templateId: 'template',
|
||||
renderTemplate(container) { return container; },
|
||||
renderElement(element, index, container) {
|
||||
if (element.element.elements.length > 1) {
|
||||
container.innerHTML = `🙈 ${element.element.elements.map(el => el.name).join('/')}`;
|
||||
} else {
|
||||
container.innerHTML = element.element.elements[0].name;
|
||||
}
|
||||
container.innerHTML = element.element.name;
|
||||
},
|
||||
renderCompressedElements(node, index, container, height) {
|
||||
container.innerHTML = `🙈 ${node.element.elements.map(el => el.name).join('/')}`;
|
||||
},
|
||||
disposeElement() { },
|
||||
disposeTemplate() { }
|
||||
@@ -146,7 +145,7 @@
|
||||
}
|
||||
};
|
||||
|
||||
const tree = new CompressedObjectTree(container, delegate, [renderer], { ...opts, filter: treeFilter, setRowLineHeight: false, collapseByDefault: true, setRowLineHeight: true });
|
||||
const tree = new CompressibleObjectTree('test', container, delegate, [renderer], { ...opts, filter: treeFilter, setRowLineHeight: false, collapseByDefault: true, setRowLineHeight: true });
|
||||
|
||||
return { tree, treeFilter };
|
||||
}
|
||||
@@ -206,7 +205,7 @@
|
||||
getChildren(element) {
|
||||
return new Promise((c, e) => {
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', element ? `/ api / readdir ? path = ${element.element.path} ` : '/api/readdir');
|
||||
xhr.open('GET', element ? `/api/readdir?path=${element.element.path}` : '/api/readdir');
|
||||
xhr.send();
|
||||
xhr.onreadystatechange = function () {
|
||||
if (this.readyState == 4 && this.status == 200) {
|
||||
@@ -228,7 +227,7 @@
|
||||
}
|
||||
};
|
||||
|
||||
const tree = new AsyncDataTree(container, delegate, [renderer], dataSource, { filter: treeFilter, sorter, identityProvider });
|
||||
const tree = new AsyncDataTree('test', container, delegate, [renderer], dataSource, { filter: treeFilter, sorter, identityProvider });
|
||||
|
||||
return { tree, treeFilter };
|
||||
}
|
||||
@@ -283,15 +282,15 @@
|
||||
}
|
||||
};
|
||||
|
||||
const tree = new DataTree(container, delegate, [renderer], dataSource, { filter: treeFilter, identityProvider });
|
||||
const tree = new DataTree('test', container, delegate, [renderer], dataSource, { filter: treeFilter, identityProvider });
|
||||
|
||||
tree.input = {
|
||||
tree.setInput({
|
||||
children: [
|
||||
{ name: 'A', children: [{ name: 'AA' }, { name: 'AB' }] },
|
||||
{ name: 'B', children: [{ name: 'BA', children: [{ name: 'BAA' }] }, { name: 'BB' }] },
|
||||
{ name: 'C' }
|
||||
]
|
||||
};
|
||||
});
|
||||
|
||||
return { tree, treeFilter };
|
||||
}
|
||||
@@ -324,9 +323,9 @@
|
||||
expandall.onclick = () => perf('expand all', () => tree.expandAll());
|
||||
collapseall.onclick = () => perf('collapse all', () => tree.collapseAll());
|
||||
renderwidth.onclick = () => perf('renderwidth', () => tree.layoutWidth(Math.random()));
|
||||
refresh.onclick = () => perf('refresh', () => tree.refresh(null, true));
|
||||
refresh.onclick = () => perf('refresh', () => tree.updateChildren());
|
||||
|
||||
tree.refresh(null);
|
||||
tree.setInput(null);
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -336,7 +335,7 @@
|
||||
expandall.onclick = () => perf('expand all', () => tree.expandAll());
|
||||
collapseall.onclick = () => perf('collapse all', () => tree.collapseAll());
|
||||
renderwidth.onclick = () => perf('renderwidth', () => tree.layoutWidth(Math.random()));
|
||||
refresh.onclick = () => perf('refresh', () => tree.refresh(null, true));
|
||||
refresh.onclick = () => perf('refresh', () => tree.updateChildren());
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -401,4 +400,4 @@
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user