Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998 (#7880)

* Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998

* fix pipelines

* fix strict-null-checks

* add missing files
This commit is contained in:
Anthony Dresser
2019-10-21 22:12:22 -07:00
committed by GitHub
parent 7c9be74970
commit 1e22f47304
913 changed files with 18898 additions and 16536 deletions

View File

@@ -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.add');
await this.code.waitAndClick('.keybindings-list-container .monaco-list-row.keybinding-item .action-item .codicon.codicon-add');
await this.code.waitForActiveElement('.defineKeybindingWidget .monaco-inputbox input');
await this.code.dispatchKeybinding(keybinding);

View File

@@ -39,7 +39,7 @@ export class Problems {
}
public static getSelectorInProblemsView(problemType: ProblemSeverity): string {
let selector = problemType === ProblemSeverity.WARNING ? 'severity-warning' : 'severity-error';
let selector = problemType === ProblemSeverity.WARNING ? 'codicon-warning' : 'codicon-error';
return `div[id="workbench.panel.markers"] .monaco-tl-contents .marker-icon.${selector}`;
}

View File

@@ -92,9 +92,17 @@ let endpoint: string | undefined;
export async function launch(_args: string[]): Promise<void> {
args = _args;
const webUserDataDir = args.filter(e => e.includes('--user-data-dir='))[0].replace('--user-data-dir=', '');
await promisify(mkdir)(webUserDataDir);
server = spawn(join(args[0], `resources/server/web.${process.platform === 'win32' ? 'bat' : 'sh'}`), ['--browser', 'none', '--driver', 'web', '--web-user-data-dir', webUserDataDir]);
const agentFolder = args.filter(e => e.includes('--user-data-dir='))[0].replace('--user-data-dir=', '');
await promisify(mkdir)(agentFolder);
const env = {
VSCODE_AGENT_FOLDER: agentFolder,
...process.env
};
server = spawn(
join(args[0], `resources/server/web.${process.platform === 'win32' ? 'bat' : 'sh'}`),
['--browser', 'none', '--driver', 'web'],
{ env }
);
server.stderr.on('data', e => console.log('Server stderr: ' + e));
server.stdout.on('data', e => console.log('Server stdout: ' + e));
process.on('exit', teardown);

View File

@@ -9,7 +9,7 @@ import { findElement, findElements, Code } from './code';
const VIEWLET = 'div[id="workbench.view.scm"]';
const SCM_INPUT = `${VIEWLET} .scm-editor textarea`;
const SCM_RESOURCE = `${VIEWLET} .monaco-list-row > .resource`;
const SCM_RESOURCE = `${VIEWLET} .monaco-list-row .resource`;
const REFRESH_COMMAND = `div[id="workbench.parts.sidebar"] .actions-container a.action-label[title="Refresh"]`;
const COMMIT_COMMAND = `div[id="workbench.parts.sidebar"] .actions-container a.action-label[title="Commit"]`;
const SCM_RESOURCE_CLICK = (name: string) => `${SCM_RESOURCE} .monaco-icon-label[title*="${name}"] .label-name`;
@@ -67,7 +67,7 @@ export class SCM extends Viewlet {
async unstage(name: string): Promise<void> {
await this.code.waitAndClick(SCM_RESOURCE_ACTION_CLICK(name, 'Unstage Changes'));
await this.waitForChange('app.js', 'Modified');
await this.waitForChange(name, 'Modified');
}
async commit(message: string): Promise<void> {

View File

@@ -84,11 +84,11 @@ export class Search extends Viewlet {
}
async expandReplace(): Promise<void> {
await this.code.waitAndClick(`${VIEWLET} .search-widget .monaco-button.toggle-replace-button.collapse`);
await this.code.waitAndClick(`${VIEWLET} .search-widget .monaco-button.toggle-replace-button.codicon-chevron-right`);
}
async collapseReplace(): Promise<void> {
await this.code.waitAndClick(`${VIEWLET} .search-widget .monaco-button.toggle-replace-button.expand`);
await this.code.waitAndClick(`${VIEWLET} .search-widget .monaco-button.toggle-replace-button.codicon-chevron-down`);
}
async setReplaceText(text: string): Promise<void> {
@@ -100,12 +100,12 @@ export class Search extends Viewlet {
await retry(
() => this.code.waitAndClick(fileMatch),
() => this.code.waitForElement(`${fileMatch} .action-label.codicon.action-replace-all`, el => !!el && el.top > 0 && el.left > 0, 10)
() => this.code.waitForElement(`${fileMatch} .action-label.codicon.codicon-replace-all`, el => !!el && el.top > 0 && el.left > 0, 10)
);
// ¯\_(ツ)_/¯
await new Promise(c => setTimeout(c, 500));
await this.code.waitAndClick(`${fileMatch} .action-label.codicon.action-replace-all`);
await this.code.waitAndClick(`${fileMatch} .action-label.codicon.codicon-replace-all`);
}
async waitForResultText(text: string): Promise<void> {

View File

@@ -44,11 +44,11 @@ export class StatusBar {
private getSelector(element: StatusBarElement): string {
switch (element) {
case StatusBarElement.BRANCH_STATUS:
return `${this.mainSelector} ${this.leftSelector} .octicon.octicon-git-branch`;
return `${this.mainSelector} ${this.leftSelector} .codicon.codicon-git-branch`;
case StatusBarElement.SYNC_STATUS:
return `${this.mainSelector} ${this.leftSelector} .octicon.octicon-sync`;
return `${this.mainSelector} ${this.leftSelector} .codicon.codicon-sync`;
case StatusBarElement.PROBLEMS_STATUS:
return `${this.mainSelector} ${this.leftSelector} .octicon.octicon-error`;
return `${this.mainSelector} ${this.leftSelector} .codicon.codicon-error`;
case StatusBarElement.SELECTION_STATUS:
return `${this.mainSelector} ${this.rightSelector}[title="Go to Line"]`;
case StatusBarElement.INDENTATION_STATUS: