Separate Settings editor open and search steps (#196866)

This commit is contained in:
Raymond Zhao 2023-10-30 07:50:27 -07:00 committed by GitHub
parent 4c7ae755ff
commit 932e49579b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View file

@ -61,8 +61,6 @@ export class SettingsEditor {
}
async searchSettingsUI(query: string): Promise<void> {
await this.openUserSettingsUI();
await this.code.waitAndClick(SEARCH_BOX);
if (process.platform === 'darwin') {
await this.code.dispatchKeybinding('cmd+a');

View file

@ -42,6 +42,7 @@ export function setup(logger: Logger) {
it('shows a modified indicator on a modified setting', async function () {
const app = this.app as Application;
await app.workbench.settingsEditor.openUserSettingsUI();
await app.workbench.settingsEditor.searchSettingsUI('@id:editor.tabSize');
await app.code.waitForSetValue('.settings-editor .setting-item-contents .setting-item-control input', '6');
await app.code.waitForElement('.settings-editor .setting-item-contents .setting-item-modified-indicator');
@ -56,6 +57,7 @@ export function setup(logger: Logger) {
await app.code.waitForElements('.line-numbers', false, elements => !!elements.length);
// Turn off line numbers
await app.workbench.settingsEditor.openUserSettingsUI();
await app.workbench.settingsEditor.searchSettingsUI('editor.lineNumbers');
await app.code.waitAndClick('.settings-editor .monaco-list-rows .setting-item-control select', 2, 2);
await app.code.waitAndClick('.context-view .option-text', 2, 2);
@ -64,10 +66,11 @@ export function setup(logger: Logger) {
await app.code.waitForElements('.line-numbers', false, elements => !elements || elements.length === 0);
});
// Skipping test due to it being flaky.
it.skip('hides the toc when searching depending on the search behavior', async function () {
it('hides the toc when searching depending on the search behavior', async function () {
const app = this.app as Application;
await app.workbench.settingsEditor.openUserSettingsUI();
// Hide ToC when searching
await app.workbench.settingsEditor.searchSettingsUI('workbench.settings.settingsSearchTocBehavior');
await app.code.waitAndClick('.settings-editor .monaco-list-rows .setting-item-control select', 2, 2);