mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-04-07 20:40:31 -04:00
Merge from vscode 2c306f762bf9c3db82dc06c7afaa56ef46d72f79 (#14050)
* Merge from vscode 2c306f762bf9c3db82dc06c7afaa56ef46d72f79 * Fix breaks * Extension management fixes * Fix breaks in windows bundling * Fix/skip failing tests * Update distro * Add clear to nuget.config * Add hygiene task * Bump distro * Fix hygiene issue * Add build to hygiene exclusion * Update distro * Update hygiene * Hygiene exclusions * Update tsconfig * Bump distro for server breaks * Update build config * Update darwin path * Add done calls to notebook tests * Skip failing tests * Disable smoke tests
This commit is contained in:
@@ -141,7 +141,6 @@ export async function spawn(options: SpawnOptions): Promise<Code> {
|
||||
'--disable-crash-reporter',
|
||||
`--extensions-dir=${options.extensionsPath}`,
|
||||
`--user-data-dir=${options.userDataDir}`,
|
||||
`--disable-restore-windows`,
|
||||
'--driver', handle
|
||||
];
|
||||
|
||||
|
||||
@@ -34,9 +34,13 @@ export class Extensions extends Viewlet {
|
||||
await this.code.waitForTypeInEditor(SEARCH_BOX, `@id:${id}`);
|
||||
}
|
||||
|
||||
async installExtension(id: string): Promise<void> {
|
||||
async installExtension(id: string, waitUntilEnabled: boolean): Promise<void> {
|
||||
await this.searchForExtension(id);
|
||||
await this.code.waitAndClick(`div.extensions-viewlet[id="workbench.view.extensions"] .monaco-list-row[data-extension-id="${id}"] .extension-list-item li[class='action-item'] .extension-action.install`);
|
||||
await this.code.waitAndClick(`div.extensions-viewlet[id="workbench.view.extensions"] .monaco-list-row[data-extension-id="${id}"] .extension-list-item .monaco-action-bar .action-item:not(.disabled) .extension-action.install`);
|
||||
await this.code.waitForElement(`.extension-editor .monaco-action-bar .action-item:not(.disabled) .extension-action.uninstall`);
|
||||
if (waitUntilEnabled) {
|
||||
await this.code.waitForElement(`.extension-editor .monaco-action-bar .action-item:not(.disabled) .extension-action[title="Disable this extension"]`);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ export class KeybindingsEditor {
|
||||
await this.code.waitAndClick('.keybindings-list-container .monaco-list-row.keybinding-item');
|
||||
await this.code.waitForElement('.keybindings-list-container .monaco-list-row.keybinding-item.focused.selected');
|
||||
|
||||
await this.code.waitAndClick('.keybindings-list-container .monaco-list-row.keybinding-item .action-item .codicon.codicon-add');
|
||||
await this.code.waitAndClick('.keybindings-list-container .monaco-list-row.keybinding-item .action-item .codicon-keybindings-add');
|
||||
await this.code.waitForActiveElement('.defineKeybindingWidget .monaco-inputbox input');
|
||||
|
||||
await this.code.dispatchKeybinding(keybinding);
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import { Code } from './code';
|
||||
import { QuickAccess } from './quickaccess';
|
||||
|
||||
export const enum ProblemSeverity {
|
||||
WARNING = 0,
|
||||
@@ -14,26 +15,18 @@ export class Problems {
|
||||
|
||||
static PROBLEMS_VIEW_SELECTOR = '.panel .markers-panel';
|
||||
|
||||
constructor(private code: Code) { }
|
||||
constructor(private code: Code, private quickAccess: QuickAccess) { }
|
||||
|
||||
public async showProblemsView(): Promise<any> {
|
||||
await this.toggleProblemsView();
|
||||
await this.quickAccess.runCommand('workbench.panel.markers.view.focus');
|
||||
await this.waitForProblemsView();
|
||||
}
|
||||
|
||||
public async hideProblemsView(): Promise<any> {
|
||||
await this.toggleProblemsView();
|
||||
await this.quickAccess.runCommand('workbench.actions.view.problems');
|
||||
await this.code.waitForElement(Problems.PROBLEMS_VIEW_SELECTOR, el => !el);
|
||||
}
|
||||
|
||||
private async toggleProblemsView(): Promise<void> {
|
||||
if (process.platform === 'darwin') {
|
||||
await this.code.dispatchKeybinding('cmd+shift+m');
|
||||
} else {
|
||||
await this.code.dispatchKeybinding('ctrl+shift+m');
|
||||
}
|
||||
}
|
||||
|
||||
public async waitForProblemsView(): Promise<void> {
|
||||
await this.code.waitForElement(Problems.PROBLEMS_VIEW_SELECTOR);
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ export class Workbench {
|
||||
this.scm = new SCM(code);
|
||||
this.debug = new Debug(code, this.quickaccess, this.editors, this.editor);
|
||||
this.statusbar = new StatusBar(code);
|
||||
this.problems = new Problems(code);
|
||||
this.problems = new Problems(code, this.quickaccess);
|
||||
this.settingsEditor = new SettingsEditor(code, userDataPath, this.editors, this.editor, this.quickaccess);
|
||||
this.keybindingsEditor = new KeybindingsEditor(code);
|
||||
this.terminal = new Terminal(code, this.quickaccess);
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# VS Code Smoke Tests Failures History
|
||||
This file contains a history of smoke test failures which could be avoided if particular techniques were used in the test (e.g. binding test elements with HTML5 `data-*` attribute).
|
||||
|
||||
To better understand what can be employed in smoke test to ensure its stability, it is important to understand patterns that led to smoke test breakage. This markdown is a result of work on [this issue](https://github.com/Microsoft/vscode/issues/27906).
|
||||
To better understand what can be employed in smoke test to ensure its stability, it is important to understand patterns that led to smoke test breakage. This markdown is a result of work on [this issue](https://github.com/microsoft/vscode/issues/27906).
|
||||
|
||||
# Log
|
||||
1. This following change led to the smoke test failure because DOM element's attribute `a[title]` was changed:
|
||||
[eac49a3](https://github.com/Microsoft/vscode/commit/eac49a321b84cb9828430e9dcd3f34243a3480f7)
|
||||
[eac49a3](https://github.com/microsoft/vscode/commit/eac49a321b84cb9828430e9dcd3f34243a3480f7)
|
||||
|
||||
This attribute was used in the smoke test to grab the contents of SCM part in status bar:
|
||||
[0aec2d6](https://github.com/Microsoft/vscode/commit/0aec2d6838b5e65cc74c33b853ffbd9fa191d636)
|
||||
[0aec2d6](https://github.com/microsoft/vscode/commit/0aec2d6838b5e65cc74c33b853ffbd9fa191d636)
|
||||
|
||||
2. To be continued...
|
||||
2. To be continued...
|
||||
|
||||
@@ -5,6 +5,9 @@ Make sure you are on **Node v12.x**.
|
||||
### Run
|
||||
|
||||
```bash
|
||||
# Build extensions in repo (if needed)
|
||||
yarn && yarn compile
|
||||
|
||||
# Install Dependencies and Compile
|
||||
yarn --cwd test/smoke
|
||||
|
||||
@@ -30,6 +33,7 @@ You must always run the smoketest version which matches the release you are test
|
||||
|
||||
```bash
|
||||
git checkout release/1.22
|
||||
yarn && yarn compile
|
||||
yarn --cwd test/smoke
|
||||
```
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ export function setup() {
|
||||
|
||||
await app.workbench.extensions.openExtensionsViewlet();
|
||||
|
||||
await app.workbench.extensions.installExtension('michelkaporin.vscode-smoketest-check');
|
||||
await app.workbench.extensions.installExtension('michelkaporin.vscode-smoketest-check', true);
|
||||
|
||||
await app.workbench.extensions.waitForExtensionsViewlet();
|
||||
|
||||
|
||||
@@ -34,10 +34,9 @@ export function setup() {
|
||||
|
||||
await app.code.waitForElement(Problems.getSelectorInEditor(ProblemSeverity.ERROR));
|
||||
|
||||
const problems = new Problems(app.code);
|
||||
await problems.showProblemsView();
|
||||
await app.workbench.problems.showProblemsView();
|
||||
await app.code.waitForElement(Problems.getSelectorInProblemsView(ProblemSeverity.ERROR));
|
||||
await problems.hideProblemsView();
|
||||
await app.workbench.problems.hideProblemsView();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ export function setup() {
|
||||
|
||||
// restart with preventing additional windows from restoring
|
||||
// to ensure the window after restart is the multi-root workspace
|
||||
await app.restart({ workspaceOrFolder: workspaceFilePath, extraArgs: ['--disable-restore-windows'] });
|
||||
await app.restart({ workspaceOrFolder: workspaceFilePath });
|
||||
});
|
||||
|
||||
it('shows results from all folders', async function () {
|
||||
|
||||
@@ -48,7 +48,7 @@ export function setup() {
|
||||
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.waitForActiveCellEditorContents('');
|
||||
await app.workbench.notebook.stopEditingCell();
|
||||
await app.workbench.notebook.deleteActiveCell();
|
||||
await app.workbench.notebook.waitForMarkdownContents('p', 'Markdown Cell');
|
||||
@@ -67,7 +67,7 @@ export function setup() {
|
||||
const app = this.app as Application;
|
||||
await app.workbench.notebook.openNotebook();
|
||||
await app.workbench.notebook.insertNotebookCell('code');
|
||||
await app.workbench.notebook.executeCellAction('.notebook-editor .monaco-list-row.focused div.monaco-toolbar .codicon-debug');
|
||||
await app.workbench.notebook.executeCellAction('.notebook-editor .monaco-list-row.focused div.monaco-toolbar .codicon-notebook-execute');
|
||||
await app.workbench.notebook.waitForActiveCellEditorContents('test');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -15,7 +15,7 @@ export function setup() {
|
||||
}
|
||||
|
||||
await app.workbench.extensions.openExtensionsViewlet();
|
||||
await app.workbench.extensions.installExtension('ms-ceintl.vscode-language-pack-de');
|
||||
await app.workbench.extensions.installExtension('ms-ceintl.vscode-language-pack-de', false);
|
||||
|
||||
await app.restart({ extraArgs: ['--locale=DE'] });
|
||||
});
|
||||
|
||||
@@ -34,7 +34,7 @@ function initLoader(opts) {
|
||||
nodeRequire: require,
|
||||
nodeMain: __filename,
|
||||
catchError: true,
|
||||
baseUrl: bootstrap.fileUriFromPath(path.join(__dirname, '../../../src')),
|
||||
baseUrl: bootstrap.fileUriFromPath(path.join(__dirname, '../../../src'), { isWindows: process.platform === 'win32' }),
|
||||
paths: {
|
||||
'vs': `../${outdir}/vs`,
|
||||
'sql': `../${outdir}/sql`, // {{SQL CARBON EDIT}}
|
||||
|
||||
Reference in New Issue
Block a user