| 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)); |