diff --git a/test/automation/src/search.ts b/test/automation/src/search.ts index de48c8eae40..78e21a5f562 100644 --- a/test/automation/src/search.ts +++ b/test/automation/src/search.ts @@ -34,8 +34,9 @@ export class Search extends Viewlet { } async clearSearchResults(): Promise { - 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 { @@ -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 { - await this.code.waitForTextContent(`${VIEWLET} .messages`, ''); + async waitForNoResultText(retryCount?: number): Promise { + await this.code.waitForTextContent(`${VIEWLET} .messages`, '', undefined, retryCount); } private async waitForInputFocus(selector: string): Promise { diff --git a/test/smoke/src/areas/search/search.test.ts b/test/smoke/src/areas/search/search.test.ts index 3156be0d0ad..83546ff24a8 100644 --- a/test/smoke/src/areas/search/search.test.ts +++ b/test/smoke/src/areas/search/search.test.ts @@ -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();