From 6e8c67047963ea95c78f584051ffe63be6d506fc Mon Sep 17 00:00:00 2001 From: Stratoula Kalafateli Date: Mon, 13 Jul 2020 16:26:33 +0300 Subject: [PATCH] [Functional test] Increase the timeout to click new vis function (#71226) Co-authored-by: Elastic Machine --- test/functional/services/listing_table.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/functional/services/listing_table.ts b/test/functional/services/listing_table.ts index 9a117458c7f76..fa42eb60fa410 100644 --- a/test/functional/services/listing_table.ts +++ b/test/functional/services/listing_table.ts @@ -179,9 +179,12 @@ export function ListingTableProvider({ getService, getPageObjects }: FtrProvider * @param promptBtnTestSubj testSubj locator for Prompt button */ public async clickNewButton(promptBtnTestSubj: string): Promise { - await retry.try(async () => { + await retry.tryForTime(20000, async () => { // newItemButton button is only visible when there are items in the listing table is displayed. - if (await testSubjects.exists('newItemButton')) { + const isnNewItemButtonPresent = await testSubjects.exists('newItemButton', { + timeout: 5000, + }); + if (isnNewItemButtonPresent) { await testSubjects.click('newItemButton'); } else { // no items exist, click createPromptButton to create new dashboard/visualization