From 7f45491926b2d930b9d4249c5d56ca8b5e593c00 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 6 Jun 2018 09:50:59 +0200 Subject: [PATCH] smoketest: avoid more flakyness in search --- test/smoke/src/areas/search/search.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/smoke/src/areas/search/search.ts b/test/smoke/src/areas/search/search.ts index 4731d6da56a..0cd12942ab0 100644 --- a/test/smoke/src/areas/search/search.ts +++ b/test/smoke/src/areas/search/search.ts @@ -54,6 +54,10 @@ export class Search extends Viewlet { async removeFileMatch(index: number): Promise { await this.code.waitAndClick(`${VIEWLET} .results .monaco-tree-rows>:nth-child(${index}) .filematch`); + + // give time for Chrome to show the remove label + await new Promise(c => setTimeout(c, 500)); + const file = await this.code.waitForTextContent(`${VIEWLET} .results .monaco-tree-rows>:nth-child(${index}) .filematch a.label-name`); await this.code.waitAndClick(`${VIEWLET} .results .monaco-tree-rows>:nth-child(${index}) .filematch .action-label.icon.action-remove`); await this.code.waitForTextContent(`${VIEWLET} .results .monaco-tree-rows>:nth-child(${index}) .filematch a.label-name`, void 0, result => result !== file); -- GitLab