From 69d33b1c59770d5f0b1cb099653426090c0c1c72 Mon Sep 17 00:00:00 2001 From: Marco Liberati Date: Tue, 3 Dec 2024 16:00:31 +0100 Subject: [PATCH] [Lens] Stabilize FTR test (#202476) ## Summary Fixes #200120 The navigation bar is not focused for some reason. Making it wait a bit seems to stabilize it. ### Checklist - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios --- .../functional/apps/lens/group2/persistent_context.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/x-pack/test/functional/apps/lens/group2/persistent_context.ts b/x-pack/test/functional/apps/lens/group2/persistent_context.ts index 6a6f56578882..b1e78d0ccb34 100644 --- a/x-pack/test/functional/apps/lens/group2/persistent_context.ts +++ b/x-pack/test/functional/apps/lens/group2/persistent_context.ts @@ -73,9 +73,11 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { await visualize.gotoVisualizationLandingPage(); await listingTable.searchForItemWithName('lnsTableVis'); await lens.clickVisualizeListItemTitle('lnsTableVis'); - await navigationalSearch.focus(); - await navigationalSearch.searchFor('type:application lens'); - await navigationalSearch.clickOnOption(0); + await retry.try(async () => { + await navigationalSearch.focus(); + await navigationalSearch.searchFor('type:application lens'); + await navigationalSearch.clickOnOption(0); + }); await lens.waitForEmptyWorkspace(); await lens.switchToVisualization('lnsLegacyMetric'); await lens.dragFieldToWorkspace('@timestamp', 'legacyMtrVis');