From 18a65d952e95c3523d8d16742be7817b8d5babb8 Mon Sep 17 00:00:00 2001 From: Matthias Wilhelm Date: Mon, 20 Dec 2021 10:28:02 +0100 Subject: [PATCH] Update _indexpattern_without_timefield.ts --- .../apps/discover/_indexpattern_without_timefield.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/functional/apps/discover/_indexpattern_without_timefield.ts b/test/functional/apps/discover/_indexpattern_without_timefield.ts index 417a20d8e0d7a..d2adce8e75a55 100644 --- a/test/functional/apps/discover/_indexpattern_without_timefield.ts +++ b/test/functional/apps/discover/_indexpattern_without_timefield.ts @@ -78,15 +78,15 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) { 5000, async () => await PageObjects.timePicker.timePickerExists() ); - - // Navigating back - await browser.goBack(); - await PageObjects.discover.waitForDocTableLoadingComplete(); await retry.waitForWithTimeout( 'index pattern to have been switched back to "without-timefield"', 5000, - async () => - (await testSubjects.getVisibleText('indexPattern-switch-link')) === 'without-timefield' + async () => { + // Navigating back + await browser.goBack(); + await PageObjects.discover.waitForDocTableLoadingComplete(); + return (await testSubjects.getVisibleText('indexPattern-switch-link')) === 'without-timefield' + } ); await retry.waitForWithTimeout(