From 3293f7afe603c636fd2902bf2628a74c8125e755 Mon Sep 17 00:00:00 2001 From: Mike Cote Date: Tue, 7 Apr 2020 13:59:55 -0400 Subject: [PATCH] Fix some extra flakiness --- .../components/builtin_alert_types/threshold/expression.tsx | 1 + .../sections/action_connector_form/action_form.tsx | 1 + .../apps/triggers_actions_ui/alerts.ts | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/threshold/expression.tsx b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/threshold/expression.tsx index 5bbec1221a3ac..7557b17f5b67d 100644 --- a/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/threshold/expression.tsx +++ b/x-pack/plugins/triggers_actions_ui/public/application/components/builtin_alert_types/threshold/expression.tsx @@ -328,6 +328,7 @@ export const IndexThresholdAlertTypeExpression: React.FunctionComponent { setActiveActionItem({ actionTypeId: actionItem.actionTypeId, index }); setAddModalVisibility(true); diff --git a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts index 1d8ce08d1cccf..02a3ee98491e2 100644 --- a/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts +++ b/x-pack/test/functional_with_es_ssl/apps/triggers_actions_ui/alerts.ts @@ -17,6 +17,7 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { const pageObjects = getPageObjects(['common', 'triggersActionsUI', 'header']); const supertest = getService('supertest'); const find = getService('find'); + const retry = getService('retry'); async function createAlert(overwrites: Record = {}) { const { body: createdAlert } = await supertest @@ -57,7 +58,11 @@ export default ({ getPageObjects, getService }: FtrProviderContext) => { await filterSelectItem.click(); await testSubjects.click('thresholdAlertTimeFieldSelect'); const fieldOptions = await find.allByCssSelector('#thresholdTimeField option'); + await retry.try(async () => { + expect(fieldOptions[1]).not.to.be(undefined); + }); await fieldOptions[1].click(); + await testSubjects.click('closePopover'); // need this two out of popup clicks to close them const nameInput = await testSubjects.find('alertNameInput'); await nameInput.click();