From b5dac4d00acedd239846a9e5f1647b11ebfdcf49 Mon Sep 17 00:00:00 2001 From: Matt Kime Date: Wed, 18 Sep 2024 10:54:00 -0500 Subject: [PATCH] better fallback when scripted field tab isn't available - for functional test --- test/functional/page_objects/settings_page.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/functional/page_objects/settings_page.ts b/test/functional/page_objects/settings_page.ts index 816307b6ee79a..be0788dae2917 100644 --- a/test/functional/page_objects/settings_page.ts +++ b/test/functional/page_objects/settings_page.ts @@ -264,10 +264,12 @@ export class SettingsPageObject extends FtrService { } async getScriptedFieldsTabCount() { - return await this.retry.try(async () => { + try { const text = await this.testSubjects.getVisibleText('tab-scriptedFields'); return text.split(' ')[2].replace(/\((.*)\)/, '$1') || '0'; - }); + } catch (e) { + return '0'; + } } async getRelationshipsTabCount() {