mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
committed by
GitHub
parent
975e05cd1c
commit
8d1d1373cd
@@ -31,7 +31,7 @@ const CONSOLE_OUTPUT = `.repl .output.expression .value`;
|
||||
const CONSOLE_EVALUATION_RESULT = `.repl .evaluation-result.expression .value`;
|
||||
const CONSOLE_LINK = `.repl .value a.link`;
|
||||
|
||||
const REPL_FOCUSED = '.repl-input-wrapper .monaco-editor .native-edit-context';
|
||||
const REPL_FOCUSED = '.repl-input-wrapper .monaco-editor textarea';
|
||||
|
||||
export interface IStackFrame {
|
||||
name: string;
|
||||
|
||||
@@ -78,10 +78,10 @@ export class Editor {
|
||||
async waitForEditorFocus(filename: string, lineNumber: number, selectorPrefix = ''): Promise<void> {
|
||||
const editor = [selectorPrefix || '', EDITOR(filename)].join(' ');
|
||||
const line = `${editor} .view-lines > .view-line:nth-child(${lineNumber})`;
|
||||
const editContext = `${editor} .native-edit-context`;
|
||||
const textarea = `${editor} textarea`;
|
||||
|
||||
await this.code.waitAndClick(line, 1, 1);
|
||||
await this.code.waitForActiveElement(editContext);
|
||||
await this.code.waitForActiveElement(textarea);
|
||||
}
|
||||
|
||||
async waitForTypeInEditor(filename: string, text: string, selectorPrefix = ''): Promise<any> {
|
||||
@@ -92,10 +92,10 @@ export class Editor {
|
||||
|
||||
await this.code.waitForElement(editor);
|
||||
|
||||
const editContext = `${editor} .native-edit-context`;
|
||||
await this.code.waitForActiveElement(editContext);
|
||||
const textarea = `${editor} textarea`;
|
||||
await this.code.waitForActiveElement(textarea);
|
||||
|
||||
await this.code.waitForTypeInEditor(editContext, text);
|
||||
await this.code.waitForTypeInEditor(textarea, text);
|
||||
|
||||
await this.waitForEditorContents(filename, c => c.indexOf(text) > -1, selectorPrefix);
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ export class Editors {
|
||||
}
|
||||
|
||||
async waitForActiveEditor(fileName: string, retryCount?: number): Promise<any> {
|
||||
const selector = `.editor-instance .monaco-editor[data-uri$="${fileName}"] .native-edit-context`;
|
||||
const selector = `.editor-instance .monaco-editor[data-uri$="${fileName}"] textarea`;
|
||||
return this.code.waitForActiveElement(selector, retryCount);
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ export class Extensions extends Viewlet {
|
||||
|
||||
async searchForExtension(id: string): Promise<any> {
|
||||
await this.commands.runCommand('Extensions: Focus on Extensions View', { exactLabelMatch: true });
|
||||
await this.code.waitForTypeInEditor('div.extensions-viewlet[id="workbench.view.extensions"] .monaco-editor .native-edit-context', `@id:${id}`);
|
||||
await this.code.waitForTypeInEditor('div.extensions-viewlet[id="workbench.view.extensions"] .monaco-editor textarea', `@id:${id}`);
|
||||
await this.code.waitForTextContent(`div.part.sidebar div.composite.title h2`, 'Extensions: Marketplace');
|
||||
|
||||
let retrials = 1;
|
||||
|
||||
@@ -46,10 +46,10 @@ export class Notebook {
|
||||
|
||||
await this.code.waitForElement(editor);
|
||||
|
||||
const editContext = `${editor} .native-edit-context`;
|
||||
await this.code.waitForActiveElement(editContext);
|
||||
const textarea = `${editor} textarea`;
|
||||
await this.code.waitForActiveElement(textarea);
|
||||
|
||||
await this.code.waitForTypeInEditor(editContext, text);
|
||||
await this.code.waitForTypeInEditor(textarea, text);
|
||||
|
||||
await this._waitForActiveCellEditorContents(c => c.indexOf(text) > -1);
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import { IElement } from './driver';
|
||||
import { findElement, findElements, Code } from './code';
|
||||
|
||||
const VIEWLET = 'div[id="workbench.view.scm"]';
|
||||
const SCM_INPUT = `${VIEWLET} .scm-editor .native-edit-context`;
|
||||
const SCM_INPUT = `${VIEWLET} .scm-editor textarea`;
|
||||
const SCM_RESOURCE = `${VIEWLET} .monaco-list-row .resource`;
|
||||
const REFRESH_COMMAND = `div[id="workbench.parts.sidebar"] .actions-container a.action-label[aria-label="Refresh"]`;
|
||||
const COMMIT_COMMAND = `div[id="workbench.parts.sidebar"] .actions-container a.action-label[aria-label="Commit"]`;
|
||||
|
||||
@@ -8,7 +8,7 @@ import { Editors } from './editors';
|
||||
import { Code } from './code';
|
||||
import { QuickAccess } from './quickaccess';
|
||||
|
||||
const SEARCH_BOX = '.settings-editor .suggest-input-container .monaco-editor .native-edit-context';
|
||||
const SEARCH_BOX = '.settings-editor .suggest-input-container .monaco-editor textarea';
|
||||
|
||||
export class SettingsEditor {
|
||||
constructor(private code: Code, private editors: Editors, private editor: Editor, private quickaccess: QuickAccess) { }
|
||||
@@ -71,7 +71,7 @@ export class SettingsEditor {
|
||||
}
|
||||
await this.code.dispatchKeybinding('Delete');
|
||||
await this.code.waitForElements('.settings-editor .settings-count-widget', false, results => !results || (results?.length === 1 && !results[0].textContent));
|
||||
await this.code.waitForTypeInEditor('.settings-editor .suggest-input-container .monaco-editor .native-edit-context', query);
|
||||
await this.code.waitForTypeInEditor('.settings-editor .suggest-input-container .monaco-editor textarea', query);
|
||||
await this.code.waitForElements('.settings-editor .settings-count-widget', false, results => results?.length === 1 && results[0].textContent.includes('Found'));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user