retry clicking (#125768) (#125816)

(cherry picked from commit 68f475f0ed)

Co-authored-by: Joe Reuter <johannes.reuter@elastic.co>
This commit is contained in:
Kibana Machine 2022-02-16 12:49:01 -05:00 committed by GitHub
parent b6555742ad
commit 68002c5c60
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -195,8 +195,12 @@ export class InspectorService extends FtrService {
*/
public async openInspectorView(viewId: string): Promise<void> {
this.log.debug(`Open Inspector view ${viewId}`);
await this.testSubjects.click('inspectorViewChooser');
await this.testSubjects.click(viewId);
await this.retry.try(async () => {
await this.testSubjects.click('inspectorViewChooser');
// check whether popover menu opens, if not, fail and retry opening
await this.testSubjects.existOrFail(viewId, { timeout: 2000 });
await this.testSubjects.click(viewId);
});
}
/**