Skip to content

Commit b11b3ad

Browse files
committed
microsoft#141054 check line numbers in settigns file
1 parent 2a147f2 commit b11b3ad

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

automation/src/settings.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ export class SettingsEditor {
1515
constructor(private code: Code, private userDataPath: string, private editors: Editors, private editor: Editor, private quickaccess: QuickAccess) { }
1616

1717
async addUserSetting(setting: string, value: string): Promise<void> {
18-
await this.openSettings();
19-
await this.editor.waitForEditorFocus('settings.json', 1);
18+
await this.openUserSettingsFile();
2019

2120
await this.code.dispatchKeybinding('right');
2221
await this.editor.waitForTypeInEditor('settings.json', `"${setting}": ${value},`);
@@ -27,11 +26,12 @@ export class SettingsEditor {
2726
const settingsPath = path.join(this.userDataPath, 'User', 'settings.json');
2827
await new Promise<void>((c, e) => fs.writeFile(settingsPath, '{\n}', 'utf8', err => err ? e(err) : c()));
2928

30-
await this.openSettings();
29+
await this.openUserSettingsFile();
3130
await this.editor.waitForEditorContents('settings.json', c => c === '{}');
3231
}
3332

34-
private async openSettings(): Promise<void> {
33+
async openUserSettingsFile(): Promise<void> {
3534
await this.quickaccess.runCommand('workbench.action.openSettingsJson');
35+
await this.editor.waitForEditorFocus('settings.json', 1);
3636
}
3737
}

smoke/src/areas/preferences/preferences.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export function setup(logger: Logger) {
1919
await app.code.waitForElements('.line-numbers', false, elements => !!elements.length);
2020

2121
await app.workbench.settingsEditor.addUserSetting('editor.lineNumbers', '"off"');
22-
await app.workbench.editors.selectTab('app.js');
22+
await app.workbench.settingsEditor.openUserSettingsFile();
2323
await app.code.waitForElements('.line-numbers', false, result => !result || result.length === 0);
2424
});
2525

0 commit comments

Comments
 (0)