From 49965636242df031a205941d2b83febf527b751f Mon Sep 17 00:00:00 2001 From: Stratoula Kalafateli Date: Thu, 9 Jul 2020 15:19:09 +0300 Subject: [PATCH] [Functional test] Increase the timeout to click new vis function --- 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