This commit is contained in:
Rob Lourens 2021-12-09 10:00:25 -08:00
parent 8efb2a1418
commit e5637ce9af
2 changed files with 6 additions and 5 deletions

View file

@ -34,8 +34,9 @@ export class Search extends Viewlet {
}
async clearSearchResults(): Promise<void> {
await this.code.waitAndClick(`.sidebar .codicon-search-clear-results`);
await this.waitForNoResultText();
await retry(
() => this.code.waitAndClick(`.sidebar .codicon-search-clear-results`),
() => this.waitForNoResultText(10));
}
async openSearchViewlet(): Promise<any> {
@ -121,8 +122,8 @@ export class Search extends Viewlet {
await this.code.waitForTextContent(`${VIEWLET} .messages .message`, undefined, result => result.startsWith(text), retryCount);
}
async waitForNoResultText(): Promise<void> {
await this.code.waitForTextContent(`${VIEWLET} .messages`, '');
async waitForNoResultText(retryCount?: number): Promise<void> {
await this.code.waitForTextContent(`${VIEWLET} .messages`, '', undefined, retryCount);
}
private async waitForInputFocus(selector: string): Promise<void> {

View file

@ -36,7 +36,7 @@ export function setup(logger: Logger) {
await app.workbench.search.waitForResultText('16 results in 5 files');
});
it.skip('searches only for *.js files & checks for correct result number', async function () {
it('searches only for *.js files & checks for correct result number', async function () {
const app = this.app as Application;
await app.workbench.search.searchFor('body');
await app.workbench.search.showQueryDetails();