Archived
1
0

chore(vscode): update to 1.55.2

This commit is contained in:
Akash Satheesan
2021-04-09 11:32:27 +05:30
1102 changed files with 39988 additions and 23544 deletions

View File

@ -35,4 +35,4 @@
"vscode-uri": "^2.0.3",
"watch": "^1.0.2"
}
}
}

View File

@ -72,14 +72,10 @@ export class Application {
await this._start();
await this.code.waitForElement('.explorer-folders-view');
if (expectWalkthroughPart) {
if (this.quality === Quality.Stable) {
// TODO@bpasero remove me in March 2021
await this.code.waitForActiveElement(`.editor-instance[data-editor-id="workbench.editor.walkThroughPart"] > div > div[tabIndex="0"]`);
} else {
await this.code.waitForElement(`.editor-instance > div > div.welcomePageFocusElement[tabIndex="0"]`);
}
}
// https://github.com/microsoft/vscode/issues/118748
// if (expectWalkthroughPart) {
// await this.code.waitForElement(`.editor-instance > div > div.welcomePageFocusElement[tabIndex="0"]`);
// }
}
async restart(options: { workspaceOrFolder?: string, extraArgs?: string[] }): Promise<any> {

View File

@ -24,10 +24,6 @@ export class Extensions extends Viewlet {
await this.code.waitForActiveElement(SEARCH_BOX);
}
async waitForExtensionsViewlet(): Promise<any> {
await this.code.waitForElement(SEARCH_BOX);
}
async searchForExtension(id: string): Promise<any> {
await this.code.waitAndClick(SEARCH_BOX);
await this.code.waitForActiveElement(SEARCH_BOX);
@ -40,6 +36,10 @@ export class Extensions extends Viewlet {
await this.code.waitAndClick(`div.extensions-viewlet[id="workbench.view.extensions"] .monaco-list-row[data-extension-id="${id}"]`);
}
async closeExtension(title: string): Promise<any> {
await this.code.waitAndClick(`.tabs-container div.tab[title="Extension: ${title}"] div.tab-actions a.action-label.codicon.codicon-close`);
}
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 .monaco-action-bar .action-item:not(.disabled) .extension-action.install`);

View File

@ -22,13 +22,13 @@ export class KeybindingsEditor {
await this.code.waitForSetValue(SEARCH_INPUT, `@command:${command}`);
const commandTitle = commandName ? `${commandName} (${command})` : command;
await this.code.waitAndClick(`.keybindings-list-container .monaco-list-row.keybinding-item .command span.monaco-highlighted-label[title="${commandTitle}"]`);
await this.code.waitForElement(`.keybindings-list-container .monaco-list-row.keybinding-item.focused.selected .command span.monaco-highlighted-label[title="${commandTitle}"]`);
await this.code.waitAndClick(`.keybindings-table-container .monaco-list-row .command[title="${commandTitle}"]`);
await this.code.waitForElement(`.keybindings-table-container .monaco-list-row.focused.selected .command[title="${commandTitle}"]`);
await this.code.dispatchKeybinding('enter');
await this.code.waitForActiveElement('.defineKeybindingWidget .monaco-inputbox input');
await this.code.dispatchKeybinding(keybinding);
await this.code.dispatchKeybinding('enter');
await this.code.waitForElement(`.keybindings-list-container .keybinding-label div[title="${keybindingTitle}"]`);
await this.code.waitForElement(`.keybindings-table-container .keybinding-label div[title="${keybindingTitle}"]`);
}
}

View File

@ -110,7 +110,7 @@ export class Search extends Viewlet {
async waitForResultText(text: string): Promise<void> {
// The label can end with " - " depending on whether the search editor is enabled
await this.code.waitForTextContent(`${VIEWLET} .messages .message>span`, undefined, result => result.startsWith(text));
await this.code.waitForTextContent(`${VIEWLET} .messages .message`, undefined, result => result.startsWith(text));
}
async waitForNoResultText(): Promise<void> {

View File

@ -17,7 +17,7 @@ const Mocha = require('mocha');
let mocha = new Mocha({
ui: 'tdd',
useColors: true
color: true
});
exports.configure = function configure(opts) {

View File

@ -5,7 +5,7 @@ Make sure you are on **Node v12.x**.
### Quick Overview
```bash
# Build extensions in repo (if needed)
# Build extensions in the VS Code repo (if needed)
yarn && yarn compile
# Install Dependencies and Compile
@ -22,9 +22,10 @@ yarn smoketest --web --browser [chromium|webkit]
# Build (Electron)
yarn smoketest --build <path to latest version> --stable-build <path to stable version>
example: yarn smoketest --build /Applications/Visual\ Studio\ Code\ -\ Insiders.app --stable-build /Applications/Visual\ Studio\ Code.app/
# Build (Web - read instructions below)
yarn smoketest --build <path to server web build> --web --browser [chromium|webkit]
yarn smoketest --build <path to server web build (ends in -web)> --web --browser [chromium|webkit]
# Remote (Electron)
yarn smoketest --build <path to latest version> --remote

View File

@ -7,35 +7,22 @@ import { Application, Quality } from '../../../../automation';
export function setup() {
describe('Extensions', () => {
it(`install and activate vscode-smoketest-check extension`, async function () {
it(`install and enable vscode-smoketest-check extension`, async function () {
const app = this.app as Application;
if (app.quality === Quality.Dev) {
this.skip();
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();
// Close extension editor because keybindings dispatch is not working when web views are opened and focused
// https://github.com/microsoft/vscode/issues/110276
await app.workbench.extensions.closeExtension('vscode-smoketest-check');
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

@ -25,34 +25,34 @@ export function setup() {
await app.workbench.quickaccess.runCommand('workbench.action.closeActiveEditor');
});
it('inserts/edits code cell', async function () {
const app = this.app as Application;
await app.workbench.notebook.openNotebook();
await app.workbench.notebook.focusNextCell();
await app.workbench.notebook.insertNotebookCell('code');
await app.workbench.notebook.waitForTypeInEditor('// some code');
await app.workbench.notebook.stopEditingCell();
});
// it('inserts/edits code cell', async function () {
// const app = this.app as Application;
// await app.workbench.notebook.openNotebook();
// await app.workbench.notebook.focusNextCell();
// await app.workbench.notebook.insertNotebookCell('code');
// await app.workbench.notebook.waitForTypeInEditor('// some code');
// await app.workbench.notebook.stopEditingCell();
// });
it('inserts/edits markdown cell', async function () {
const app = this.app as Application;
await app.workbench.notebook.openNotebook();
await app.workbench.notebook.focusNextCell();
await app.workbench.notebook.insertNotebookCell('markdown');
await app.workbench.notebook.waitForTypeInEditor('## hello2! ');
await app.workbench.notebook.stopEditingCell();
await app.workbench.notebook.waitForMarkdownContents('h2', 'hello2!');
});
// it('inserts/edits markdown cell', async function () {
// const app = this.app as Application;
// await app.workbench.notebook.openNotebook();
// await app.workbench.notebook.focusNextCell();
// await app.workbench.notebook.insertNotebookCell('markdown');
// await app.workbench.notebook.waitForTypeInEditor('## hello2! ');
// await app.workbench.notebook.stopEditingCell();
// await app.workbench.notebook.waitForMarkdownContents('h2', 'hello2!');
// });
it('moves focus as it inserts/deletes a cell', async function () {
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.stopEditingCell();
await app.workbench.notebook.deleteActiveCell();
await app.workbench.notebook.waitForMarkdownContents('p', 'Markdown Cell');
});
// it('moves focus as it inserts/deletes a cell', async function () {
// 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.stopEditingCell();
// await app.workbench.notebook.deleteActiveCell();
// await app.workbench.notebook.waitForMarkdownContents('p', 'Markdown Cell');
// });
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;
@ -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-notebook-execute');
await app.workbench.notebook.executeCellAction('.notebook-editor .monaco-list-row.focused div.monaco-toolbar .codicon-debug');
await app.workbench.notebook.waitForActiveCellEditorContents('test');
});
});

View File

@ -7,6 +7,7 @@ import * as cp from 'child_process';
import { Application } from '../../../../automation';
export function setup() {
// https://github.com/microsoft/vscode/issues/115244
describe('Search', () => {
after(function () {
const app = this.app as Application;
@ -34,7 +35,6 @@ export function setup() {
await app.workbench.search.hideQueryDetails();
});
// 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');
@ -54,7 +54,7 @@ export function setup() {
await app.workbench.search.searchFor('ydob');
await app.workbench.search.setReplaceText('body');
await app.workbench.search.replaceFileMatch('app.js');
await app.workbench.search.waitForNoResultText();
await app.workbench.search.waitForResultText('0 results in 0 files');
});
});

View File

@ -6,7 +6,7 @@
import { Application, Quality } from '../../../../automation';
export function setup() {
describe.skip('Localization', () => {
describe('Localization', () => {
before(async function () {
const app = this.app as Application;
@ -20,7 +20,7 @@ export function setup() {
await app.restart({ extraArgs: ['--locale=DE'] });
});
it.skip(`starts with 'DE' locale and verifies title and viewlets text is in German`, async function () {
it(`starts with 'DE' locale and verifies title and viewlets text is in German`, async function () {
const app = this.app as Application;
if (app.quality === Quality.Dev) {

View File

@ -8,6 +8,7 @@ All unit tests are run inside a electron-browser environment which access to DOM
- use the `--debug` to see an electron window with dev tools which allows for debugging
- to run only a subset of tests use the `--run` or `--glob` options
- use `yarn watch` to automatically compile changes
For instance, `./scripts/test.sh --debug --glob **/extHost*.test.js` runs all tests from `extHost`-files and enables you to debug them.
@ -24,7 +25,7 @@ Unit tests from layers `common` and `browser` are run inside `chromium`, `webkit
## Run (with node)
yarn run mocha --run src/vs/editor/test/browser/controller/cursor.test.ts
yarn run mocha --ui tdd --run src/vs/editor/test/browser/controller/cursor.test.ts
## Coverage