From 9b56868a5c74c4fd83ba2640a88518ccfca6c3e3 Mon Sep 17 00:00:00 2001 From: Coen Warmer Date: Mon, 8 May 2023 13:34:16 +0200 Subject: [PATCH] Attempt to make Cases FTR tests less fragile --- .../apps/observability/pages/alerts/add_to_case.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/x-pack/test/observability_functional/apps/observability/pages/alerts/add_to_case.ts b/x-pack/test/observability_functional/apps/observability/pages/alerts/add_to_case.ts index e43305267ffb0..5a1086bf1725e 100644 --- a/x-pack/test/observability_functional/apps/observability/pages/alerts/add_to_case.ts +++ b/x-pack/test/observability_functional/apps/observability/pages/alerts/add_to_case.ts @@ -41,7 +41,10 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => { }); it('renders case options in the overflow menu', async () => { - await observability.alerts.common.openActionsMenuForRow(0); + await retry.try(async () => { + await observability.alerts.common.openActionsMenuForRow(0); + }); + await retry.try(async () => { await observability.alerts.addToCase.getAddToExistingCaseSelectorOrFail(); await observability.alerts.addToCase.getAddToNewCaseSelectorOrFail(); @@ -60,7 +63,9 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => { }); it('opens a modal when Add to existing case is clicked', async () => { - await observability.alerts.common.openActionsMenuForRow(0); + await retry.try(async () => { + await observability.alerts.common.openActionsMenuForRow(0); + }); await retry.try(async () => { await observability.alerts.addToCase.addToExistingCaseButtonClick(); @@ -85,7 +90,9 @@ export default ({ getService, getPageObjects }: FtrProviderContext) => { }); it('does not render case options in the overflow menu', async () => { - await observability.alerts.common.openActionsMenuForRow(0); + await retry.try(async () => { + await observability.alerts.common.openActionsMenuForRow(0); + }); await retry.try(async () => { await observability.alerts.addToCase.missingAddToExistingCaseSelectorOrFail(); await observability.alerts.addToCase.missingAddToNewCaseSelectorOrFail();