Fix #31437
This commit is contained in:
parent
2ae6a69efa
commit
ad88a7b36a
2 changed files with 2 additions and 8 deletions
|
@ -442,7 +442,6 @@ class SideBySidePreferencesWidget extends Widget {
|
|||
|
||||
this.editablePreferencesEditorContainer = DOM.append(parentElement, DOM.$('.editable-preferences-editor-container'));
|
||||
this.editablePreferencesEditorContainer.style.position = 'absolute';
|
||||
this.lastFocusedEditor = this.editablePreferencesEditor;
|
||||
|
||||
this._register(attachStylerCallback(this.themeService, { scrollbarShadow }, colors => {
|
||||
const shadow = colors.scrollbarShadow ? colors.scrollbarShadow.toString() : null;
|
||||
|
@ -512,6 +511,7 @@ class SideBySidePreferencesWidget extends Widget {
|
|||
this.editablePreferencesEditor.create(new Builder(this.editablePreferencesEditorContainer));
|
||||
this.editablePreferencesEditor.setVisible(true);
|
||||
(<CodeEditor>this.editablePreferencesEditor.getControl()).onDidFocusEditor(() => this.lastFocusedEditor = this.editablePreferencesEditor);
|
||||
this.lastFocusedEditor = this.editablePreferencesEditor;
|
||||
return editor;
|
||||
});
|
||||
}
|
||||
|
|
|
@ -27,13 +27,7 @@ export class CommonActions {
|
|||
public async addSetting(setting: string, value: string): Promise<any> {
|
||||
await this.spectron.command('workbench.action.openGlobalSettings');
|
||||
await this.spectron.wait();
|
||||
try {
|
||||
await this.spectron.client.leftClick('.editable-preferences-editor-container .view-lines', 1, 1, false);
|
||||
} catch (e) {
|
||||
return Promise.reject('Failed to select settings editor to add a setting.');
|
||||
}
|
||||
await this.spectron.wait();
|
||||
await this.spectron.client.keys(['ArrowDown', 'NULL', 'ArrowDown', 'NULL'], false);
|
||||
await this.spectron.client.keys(['ArrowDown', 'NULL', 'ArrowRight', 'NULL'], false);
|
||||
await this.spectron.client.keys(`"${setting}": "${value}"`);
|
||||
await this.spectron.wait();
|
||||
return this.saveOpenedFile();
|
||||
|
|
Loading…
Reference in a new issue