Add Settings editor smoke tests (#189687)

Fixes #141054
This commit is contained in:
Raymond Zhao
2023-08-07 08:22:07 -07:00
committed by GitHub
parent 278d86e9ca
commit e1dfb2a559
2 changed files with 48 additions and 1 deletions

View File

@@ -53,4 +53,21 @@ export class SettingsEditor {
await this.quickaccess.runCommand('workbench.action.openSettingsJson');
await this.editor.waitForEditorFocus('settings.json', 1);
}
async openUserSettingsUI(): Promise<void> {
await this.quickaccess.runCommand('workbench.action.openSettings2');
await this.code.waitForElement('.settings-editor');
}
async searchSettingsUI(query: string): Promise<void> {
await this.openUserSettingsUI();
await this.code.waitAndClick('.settings-editor .suggest-input-container .monaco-editor textarea');
if (process.platform === 'darwin') {
await this.code.dispatchKeybinding('cmd+a');
} else {
await this.code.dispatchKeybinding('ctrl+a');
}
await this.code.dispatchKeybinding('Delete');
await this.code.waitForTypeInEditor('.settings-editor .suggest-input-container .monaco-editor textarea', query);
}
}