MCPcopy Index your code
hub / github.com/microsoft/vscode / waitForEditorContents

Method waitForEditorContents

test/automation/src/editor.ts:114–117  ·  view source on GitHub ↗
(filename: string, accept: (contents: string) => boolean, selectorPrefix = '')

Source from the content-addressed store, hash-verified

112 }
113
114 async waitForEditorContents(filename: string, accept: (contents: string) => boolean, selectorPrefix = ''): Promise<any> {
115 const selector = [selectorPrefix || '', `${EDITOR(filename)} .view-lines`].join(' ');
116 return this.code.waitForTextContent(selector, undefined, c => accept(c.replace(/\u00a0/g, ' ')));
117 }
118
119 private async getClassSelectors(filename: string, term: string, viewline: number): Promise<string[]> {
120 const elements = await this.code.waitForElements(`${VIEW_LINES(filename)}>:nth-child(${viewline}) span span`, false, els => els.some(el => el.textContent === term));

Callers 5

waitForTypeInEditorMethod · 0.95
clearUserSettingsMethod · 0.45
waitForReplCommandMethod · 0.45
setupFunction · 0.45
testHotExitFunction · 0.45

Calls 5

waitForTextContentMethod · 0.80
EDITORFunction · 0.70
joinMethod · 0.65
replaceMethod · 0.65
acceptFunction · 0.50

Tested by 2

setupFunction · 0.36
testHotExitFunction · 0.36